PHP 8.5.0 Alpha 4 available for testing

Voting

: max(five, five)?
(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