3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $c = array(); // You store some data using some string keys foreach (array('ab', 'cd', '10', 'gh', '24') as $key) { $c[$key] = 1; } // You pass the array $c to some place else and there you do something like foreach ($c as $k => $v) { if ($k === '10') { echo "found"; exit; } } echo "Not found"; print_r($c);
based on XTuNL
Output for 4.3.0 - 7.2.0
Not foundArray ( [ab] => 1 [cd] => 1 [10] => 1 [gh] => 1 [24] => 1 )