Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

array array = array()

<?php

class x {
    // PHP 8.3 syntax
    const array array = array();
}

This made me chuckle… welcome to PHP 8.3 !

First array is the type, the second is the name of the constant, with the relaxed keyword, and the last one is the value of the array. It is not often that three times the same token is used in a row. Could we try 4 times?

See Also

PHP Features

Last updated: 09 November 2026