3v4l.org

run code in 300+ PHP versions simultaneously
function runAllSamples(){ sample1(); sample2(); sample3(); runAllUnitTests(); } function sample1(){ $pageWriter = new PageWriter(); $pageWriter->write(); } class PageWriter{ private $useRandom = false; function __construct($testMode = false){ $useRandom = !$testMode; } function write(){ echo '';?> <?php; } } function runAllUnitTests(){ $pageWriter = new PageWriter(false); $success = compareWebPageHTML($pageWriter.write()); echo 'Unit test PageWriter (sample one): ' . $success ? 'success' : 'failed'; } runAllSamples(); ?>

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)
8.3.60.0090.00616.50
8.3.50.0110.00920.98
8.3.40.0070.00718.58
8.3.30.0040.01118.46
8.3.20.0080.00020.10
8.3.10.0040.00421.49
8.3.00.0040.00421.77
8.2.180.0070.00718.18
8.2.170.0080.00622.96
8.2.160.0200.00020.35
8.2.150.0040.00425.66
8.2.140.0080.00024.66
8.2.130.0040.00421.04
8.2.120.0070.00026.35
8.2.110.0000.00919.39
8.2.100.0120.00017.92
8.2.90.0000.00819.05
8.2.80.0040.00417.97
8.2.70.0030.00617.38
8.2.60.0070.00217.80
8.2.50.0080.00018.09
8.2.40.0080.00022.36
8.2.30.0000.00719.30
8.2.20.0000.00717.54
8.2.10.0040.00417.97
8.2.00.0040.00418.02
8.1.280.0090.00625.92
8.1.270.0120.00622.06
8.1.260.0040.00428.09
8.1.250.0070.00028.09
8.1.240.0040.00422.15
8.1.230.0100.00017.76
8.1.220.0080.00017.74
8.1.210.0000.00818.77
8.1.200.0060.00317.23
8.1.190.0060.00317.11
8.1.180.0000.00818.10
8.1.170.0030.00618.45
8.1.160.0070.00020.67
8.1.150.0000.00718.66
8.1.140.0050.00319.56
8.1.130.0000.00717.57
8.1.120.0050.00217.28
8.1.110.0000.00717.21
8.1.100.0040.00417.21
8.1.90.0000.00717.30
8.1.80.0030.00617.33
8.1.70.0040.00417.28
8.1.60.0070.00017.41
8.1.50.0000.00817.43
8.1.40.0070.00017.43
8.1.30.0040.00417.57
8.1.20.0070.00017.49
8.1.10.0000.00717.48
8.1.00.0040.00417.40
8.0.300.0050.00318.77
8.0.290.0050.00316.63
8.0.280.0030.00318.21
8.0.270.0000.00717.13
8.0.260.0030.00317.04
8.0.250.0070.00016.80
8.0.240.0030.00316.75
8.0.230.0030.00716.83
8.0.220.0000.00716.72
8.0.210.0040.00416.71
8.0.200.0080.00016.83
8.0.190.0040.00416.82
8.0.180.0000.00716.78
8.0.170.0070.00016.67
8.0.160.0000.00816.75
8.0.150.0040.00416.70
8.0.140.0000.00816.69
8.0.130.0060.00013.45
8.0.120.0060.00316.69
8.0.110.0040.00416.61
8.0.100.0040.00416.86
8.0.90.0040.00416.86
8.0.80.0040.01616.75
8.0.70.0000.00716.79
8.0.60.0080.00016.74
8.0.50.0080.00016.71
8.0.30.0110.00816.81
8.0.20.0110.01217.40
8.0.10.0070.00016.70
8.0.00.0130.00716.60
7.4.330.0030.00316.93
7.4.320.0000.00616.44
7.4.300.0040.00416.37
7.4.290.0070.00016.41
7.4.280.0000.00816.39
7.4.270.0050.00216.47
7.4.260.0030.00316.27
7.4.250.0030.00616.40
7.4.240.0000.00716.38
7.4.230.0000.00716.52
7.4.220.0090.01016.57
7.4.210.0050.00916.50
7.4.200.0030.00616.53
7.4.160.0080.00816.16
7.4.150.0060.01117.40
7.4.140.0140.00517.86
7.4.130.0170.00716.44
7.4.120.0090.00916.34
7.4.110.0060.01216.16
7.4.100.0130.00716.54
7.4.90.0110.00516.33
7.4.80.0060.01019.39
7.4.70.0110.00416.17
7.4.60.0120.00316.43
7.4.50.0040.01116.42
7.4.40.0030.01316.40
7.4.30.0070.01516.35
7.3.330.0030.00312.98
7.3.320.0050.00013.11
7.3.310.0040.00416.14
7.3.300.0040.00416.16
7.3.290.0000.00816.14
7.3.280.0090.00816.13
7.3.270.0110.01117.40
7.3.260.0040.01416.16
7.3.240.0030.01416.23
7.3.230.0070.01016.39
7.3.210.0060.00916.45
7.3.200.0170.00019.39
7.3.190.0100.00616.15
7.3.180.0030.01416.46
7.3.170.0100.00616.30
7.3.160.0060.01216.12
7.2.330.0080.00816.47
7.2.320.0160.00316.53
7.2.310.0120.00416.29
7.2.300.0090.00616.41
7.2.290.0080.00816.57
7.0.20.0470.06720.12
7.0.10.0070.05320.30
7.0.00.0130.07020.07
5.6.160.0000.09020.46
5.6.150.0070.03718.23
5.6.140.0000.09018.28
5.6.130.0100.04318.20
5.6.120.0100.03720.97
5.6.110.0030.04020.95
5.6.100.0070.08320.97
5.6.90.0030.04320.99
5.6.80.0030.04020.37
5.5.300.0100.07018.01
5.5.290.0030.05718.07
5.5.280.0100.08320.80
5.5.270.0100.05020.97
5.5.260.0100.06320.95
5.5.250.0100.04720.68
5.5.240.0170.06320.18

preferences:
46.36 ms | 401 KiB | 5 Q