3v4l.org

run code in 300+ PHP versions simultaneously
<?php $x = new stdclass; $x->{42} = 1337; $x = (array)$x; var_dump($x); //$x = array("42" => 1337); foreach ($x as $key => $value) { if (!array_key_exists((string)$key, $x)) echo 'wtf'; } ?>

preferences:
50.2 ms | 402 KiB | 5 Q