3v4l.org

run code in 500+ PHP versions simultaneously
<?php declare(strict_types=1); $a = [null => 'c']; var_dump($a); print_r ($a[null]); print_r ($a['']);
Output for 8.5.0 - 8.5.9
Deprecated: Using null as an array offset is deprecated, use an empty string instead in /in/ORHKh on line 5 array(1) { [""]=> string(1) "c" } Deprecated: Using null as an array offset is deprecated, use an empty string instead in /in/ORHKh on line 9 cc
Output for 8.1.23 - 8.1.34, 8.2.1 - 8.2.32, 8.3.0 - 8.3.33, 8.4.1 - 8.4.24
array(1) { [""]=> string(1) "c" } cc

preferences:
76.02 ms | 894 KiB | 4 Q