3v4l.org

run code in 300+ PHP versions simultaneously
<?php $logfile = $argv[1]; function doLog($msg) { global $logfile; $datestr = date("Y-M-d H:i:s T",time()); $msg="[".$datestr."]". $msg . "\n"; file_put_contents($logfile, $msg, FILE_APPEND); } doLog("Starting test"); $i = 0; while(true) { echo "Echoing a string to standard out!!!\n"; if((++$i % 10) == 0) { doLog("Completed $i iterations"); } } doLog("Script exited normally"); return 0; ?>

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.60.0000.01517.12
7.2.50.0100.00717.18
7.1.200.0080.00815.63
7.1.70.0060.00616.96
7.1.60.0110.01419.17
7.1.50.0160.00717.38
7.1.00.0000.03722.19
7.0.200.0030.00716.67
7.0.140.0070.07322.18
7.0.80.0100.03719.91
7.0.70.0130.02319.93
7.0.60.0130.07019.82
7.0.50.0500.08020.35
7.0.40.0070.06720.10
7.0.30.0170.07020.13
7.0.20.0100.07320.07
7.0.10.0130.04320.14
7.0.00.0170.04020.07
5.6.230.0070.03320.69
5.6.220.0070.04020.56
5.6.210.0100.08020.77
5.6.200.0070.06721.00
5.6.190.0130.04021.14
5.6.180.0170.07721.04
5.6.170.0200.04021.05
5.6.160.0070.07721.05
5.6.150.0070.08721.05
5.6.140.0130.04721.02
5.6.130.0100.08321.10
5.6.120.0200.07321.03
5.6.110.0200.07021.04
5.6.100.0100.08020.91
5.6.90.0100.08321.02
5.6.80.0000.08320.53
5.6.70.0070.05320.33
5.6.60.0100.06020.33
5.6.50.0100.07320.40
5.6.40.0070.07720.52
5.6.30.0130.07320.38
5.6.20.0100.04720.52
5.6.10.0130.07320.52
5.6.00.0070.08020.42
5.5.370.0130.05020.40
5.5.360.0230.05020.45
5.5.350.0230.04720.46
5.5.340.0070.06020.95
5.5.330.0170.06720.84
5.5.320.0170.05720.96
5.5.310.0130.05720.80
5.5.300.0170.05320.93
5.5.290.0100.06020.94
5.5.280.0330.03720.95
5.5.270.0170.06020.85
5.5.260.0230.05320.94
5.5.250.0130.07320.74
5.5.240.0130.05320.32
5.5.230.0130.05320.10
5.5.220.0230.05020.32
5.5.210.0100.05720.31
5.5.200.0170.05020.20
5.5.190.0070.06720.24
5.5.180.0130.05320.21
5.5.160.0170.05020.13
5.5.150.0170.05320.19
5.5.140.0100.05320.29
5.5.130.0100.05320.30
5.5.120.0200.04720.15
5.5.110.0300.05320.28
5.5.100.0030.06720.19
5.5.90.0070.05720.18
5.5.80.0200.04720.22
5.5.70.0100.07320.06
5.5.60.0170.04720.07
5.5.50.0130.05320.03
5.5.40.0130.05320.18
5.5.30.0070.05720.08
5.5.20.0130.05320.18
5.5.10.0100.05720.18
5.5.00.0230.06020.19
5.4.450.0070.06319.36
5.4.440.0200.05019.28
5.4.430.0200.05319.51
5.4.420.0170.05019.33
5.4.410.0100.06019.26
5.4.400.0130.05018.86
5.4.390.0130.05318.89
5.4.380.0070.05318.86
5.4.370.0070.05318.84
5.4.360.0130.05018.93
5.4.350.0030.07018.99
5.4.340.0070.05719.07
5.4.320.0230.07018.98
5.4.310.0030.06019.22
5.4.300.0070.05719.07
5.4.290.0130.05719.10
5.4.280.0170.05319.21
5.4.270.0200.04719.07
5.4.260.0130.05719.05
5.4.250.0130.04719.05
5.4.240.0100.05319.09
5.4.230.0100.07718.85
5.4.220.0100.05319.10
5.4.210.0130.05019.21
5.4.200.0200.05719.21
5.4.190.0070.05718.84
5.4.180.0200.04719.04
5.4.170.0070.05718.88
5.4.160.0130.05019.20
5.4.150.0170.05018.88
5.4.140.0100.04716.55
5.4.130.0170.04316.47
5.4.120.0070.05016.33
5.4.110.0070.06016.50
5.4.100.0200.04316.52
5.4.90.0000.06016.44
5.4.80.0000.06016.50
5.4.70.0100.05016.48
5.4.60.0000.06016.49
5.4.50.0100.04316.52
5.4.40.0170.07016.30
5.4.30.0170.04316.48
5.4.20.0100.04716.30
5.4.10.0130.05716.52
5.4.00.0030.05315.75
5.3.290.0070.05714.51
5.3.280.0200.05714.31
5.3.270.0130.05314.45
5.3.260.0130.05014.45
5.3.250.0070.05314.28
5.3.240.0000.06314.45
5.3.230.0070.05314.31
5.3.220.0100.04714.39
5.3.210.0130.05714.41
5.3.200.0130.04714.39
5.3.190.0100.06014.41
5.3.180.0270.04314.43
5.3.170.0100.05314.43
5.3.160.0100.04714.55
5.3.150.0100.05014.42
5.3.140.0100.05714.38
5.3.130.0100.05314.37
5.3.120.0100.05014.44
5.3.110.0130.05014.39
5.3.100.0100.05713.88
5.3.90.0130.04313.91
5.3.80.0100.05313.80
5.3.70.0130.04713.81
5.3.60.0200.04013.75
5.3.50.0100.05013.73
5.3.40.0100.05013.75
5.3.30.0070.05313.71
5.3.20.0070.05013.46
5.3.10.0100.04713.45
5.3.00.0170.04313.47

preferences:
32.49 ms | 401 KiB | 5 Q