3v4l.org

run code in 300+ PHP versions simultaneously
<?php $start = microtime(true); switch (pcntl_fork()) { case -1: die('problem'); break; case 0: $a = 234325; for ($i = 0; $i < 1000000; ++$i) { // wasting CPU $a *= $i; } break; default: pcntl_wait(); echo "the child took " . (microtime(true) - $start) . " micro seconds"; }
Output for 7.1.25 - 7.1.33, 7.2.0 - 7.2.25, 7.3.0 - 7.3.12, 7.4.0
Fatal error: Uncaught Error: Call to undefined function pcntl_fork() in /in/WQWvA:5 Stack trace: #0 {main} thrown in /in/WQWvA on line 5
Process exited with code 255.

preferences:
76.4 ms | 402 KiB | 54 Q