3v4l.org

run code in 300+ PHP versions simultaneously
<?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);

preferences:
39.06 ms | 402 KiB | 5 Q