PHP 8.5.0 Beta 1 available for testing

Voting

: eight plus zero?
(Example: nine)

The Note You're Voting On

user at NOSPAM dot example dot com
4 years ago
As of PHP 8.0 the example code

<?php
$b
= array_fill(-2, 4, 'pear');
print_r($b);
?>

now returns

Array
(
[-2] => pear
[-1] => pear
[0] => pear
[1] => pear
)

See https://wiki.php.net/rfc/negative_array_index and https://github.com/php/php-src/pull/3772

<< Back to user notes page

To Top