3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $a = array(); for($i=0;$i<=1000;$i++) { $a[$i] = rand(10,1000); } $foo = 0; for($i=0;$i<10000;$i++){ if (array_key_exists(rand(0,1000), $a)) { $foo++; } } echo $foo;
based on qoIeV
Output for 4.3.0 - 7.2.6
10000