3v4l.org

run code in 300+ PHP versions simultaneously
<?php $m = ['a' => 1, 0 => 'foo', 'k' => FALSE]; unset($m['a']); var_dump($m); unset($m[1]); var_dump($m);
Output for 7.1.0 - 7.1.33, 7.2.0 - 7.2.33, 7.3.0 - 7.3.33, 7.4.0 - 7.4.30, 8.0.0 - 8.0.20, 8.1.0 - 8.1.7
array(2) { [0]=> string(3) "foo" ["k"]=> bool(false) } array(2) { [0]=> string(3) "foo" ["k"]=> bool(false) }

preferences:
48.96 ms | 410 KiB | 5 Q