PHP 8.4.24 Released!

Voting

: max(zero, one)?
(Example: nine)

The Note You're Voting On

user at NOSPAM dot example dot com
5 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