3v4l.org

run code in 300+ PHP versions simultaneously
<?php for($i = 0; $i < 1; test()){ echo $i, "\n"; } function test(){ if (rand() == 1){ global $i; $i = 1; } }

preferences:
32.92 ms | 402 KiB | 5 Q