headermask image

header image

Proposal for a new Array Syntax in PHP

A new array syntax has been proposed (for quite some time) for defining arrays in PHP. Currently, we use array() construct to create an array. Some examples could be:
$myArray = array(1, 2, 3, 4, 5);
$yourArray = array(1 => “one”, 2 => “two”, “three”);
$herArray = array(1, 2, 3, array(4 => “four”, “five”));
The proposal is to use [...]