3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $array = array( 0 => 'test wrong', 'test' => 'test correct', ); foreach ($array as $key => $value) { if ($key == 'test') { print($value . "\n"); } } echo "----------------------------------\n"; foreach ($array as $key => $value) { if ($key === 'test') { print($value . "\n"); } }
based on gR2Ko
Output for 4.3.0 - 7.1.0
test wrong test correct ---------------------------------- test correct