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 '<hr/>'; foreach ($array as $key => $value) { if ($key === 'test') { print($value . "\n"); } }
based on LmCh4
Output for 4.3.0 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
test wrong test correct <hr/>test correct