3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Captcha{ public static function Captcha($sol){ $random = rand(1, 15); if (empty($sol)) { return 'What is ' . $random . ' + ' . $random . ' '; } $answer = $random + $random; if ($sol != $answer) { return false; } else { return true; } } } for ($i=0; $i < 100; $i++) { echo Captcha::Captcha($i); }

Here you find the average performance (time & memory) of each version. A grayed out version indicates it didn't complete successfully (based on exit-code).

VersionSystem time (s)User time (s)Memory (MiB)
7.2.40.0280.01017.76
7.2.30.0240.01117.53
7.2.20.0210.01317.81
7.2.10.0210.01417.73
7.2.00.0200.01217.68
7.1.160.0300.01416.52
7.1.150.0320.01016.57
7.1.140.0240.00916.28
7.1.130.0410.01116.61
7.1.120.0380.00816.60
7.1.110.1110.01115.68
7.1.100.0240.00916.02
7.1.90.0290.00415.93
7.1.80.0220.01315.98
7.1.70.0360.01114.95
7.1.60.0370.01533.11
7.1.50.0550.01432.90
7.1.40.0430.01332.32
7.1.30.0350.01532.41
7.1.20.0410.01232.61
7.1.10.0230.00814.55
7.1.00.0480.01514.50

preferences:
50 ms | 403 KiB | 5 Q