3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = array(); $a["100"] = true; echo "\$a is an associative map: "; var_export($a); echo "\n\n"; $keys = array_keys($a); echo "It has these keys: "; var_export($keys); echo "\n\n"; echo "But there was a silent string-int coercion when we added an object to the container using a string key that looked like an int\n\n" var_dump( is_string($keys[0]) );
Output for 5.4.0 - 5.4.24
Parse error: syntax error, unexpected 'var_dump' (T_STRING), expecting ',' or ';' in /in/IvW9n on line 17
Process exited with code 255.
Output for 5.3.0 - 5.3.28
Parse error: syntax error, unexpected T_STRING, expecting ',' or ';' in /in/IvW9n on line 17
Process exited with code 255.

preferences:
181.29 ms | 1395 KiB | 61 Q