3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $a = array(); $a['10'] = 'abc'; $a['a'] = 'cde'; foreach ($a as $k=>$v) { if ($k === '10') { echo "found"; } } //The above code the '10' key gets silently gets converted to integer key 10. So when iterating over the dictionary using the keys, the key is never '10'.
based on fXcm9
Output for 4.3.0 - 5.0.5, 5.1.1 - 7.2.0
Output for 5.1.0
Fatal error: fatal flex scanner internal error--end of buffer missed in /in/GIn4Kt on line 12
Process exited with code 255.