3v4l.org

run code in 300+ PHP versions simultaneously
<?php $input = [ '0' => 'foo', '0101' => 'foo', '0xA0' => 'foo', '0A' => 'foo', '10' => 'foo', '866' => 'foo', 'foo' => 'foo', ]; var_export($input); echo PHP_EOL; var_dump(unserialize(serialize($input)));
Output for 7.3.0 - 7.3.33, 7.4.0 - 7.4.29, 8.0.0 - 8.0.19, 8.1.0 - 8.1.6
array ( 0 => 'foo', '0101' => 'foo', '0xA0' => 'foo', '0A' => 'foo', 10 => 'foo', 866 => 'foo', 'foo' => 'foo', ) array(7) { [0]=> string(3) "foo" ["0101"]=> string(3) "foo" ["0xA0"]=> string(3) "foo" ["0A"]=> string(3) "foo" [10]=> string(3) "foo" [866]=> string(3) "foo" ["foo"]=> string(3) "foo" }

preferences:
47.59 ms | 410 KiB | 5 Q