3v4l.org

run code in 300+ PHP versions simultaneously
<?php error_reporting(E_ALL); $x = []; $x['1'] = "numeric string"; $x["hello"] = "normal string"; $x['01'] = "fun 1"; $x['5.5'] = "fun 2"; $x[' 1'] = "HA HA"; echo var_export($x, true) . "\n"; foreach ($x as $k => $v) { printf("%s => %s\n", $v, gettype($k)); }

preferences:
16.14 ms | 402 KiB | 5 Q