-
Notifications
You must be signed in to change notification settings - Fork 8k
Open
Description
Description
The following code:
<?php
$a = [null => 1];
echo $a[null];
Resulted in this output:
Deprecated: Using null as an array offset is deprecated, use an empty string instead in /var/www/test.php on line 5
1
But I expected this output instead:
Deprecated: Using null as an array offset is deprecated, use an empty string instead in /var/www/test.php on line 3
Deprecated: Using null as an array offset is deprecated, use an empty string instead in /var/www/test.php on line 5
1
PHP Version
PHP 8.5.0RC2 (cli) (built: Oct 9 2025 23:32:25) (NTS)
Copyright (c) The PHP Group
Built by https://github.com/docker-library/php
Zend Engine v4.5.0RC2, Copyright (c) Zend Technologies
with Zend OPcache v8.5.0RC2, Copyright (c), by Zend Technologies
Operating System
Docker php:8.5.0RC2-cli-bookworm