3v4l.org

run code in 300+ PHP versions simultaneously
<?php $i=0; $arr = array(); $arr2 = array(); $time = microtime(true); while($i < 1000000) { $i++; $arr[] = $i; } $time = microtime(true) - $time; echo 'took ' . number_format($time, 3)."\n"; $time = microtime(true); while($i < 100000) { $i++; array_push($arr2, $i); } $time = microtime(true) - $time; echo 'took ' . number_format($time, 3)."\n";

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.3.10.0820.04450.51
7.3.00.0450.02350.72
7.2.130.0530.02550.54
7.2.120.0900.02750.85
7.2.110.0740.03250.67
7.2.100.0830.03150.46
7.2.90.1080.02750.66
7.2.80.1030.03550.29
7.2.70.0940.03650.67
7.2.60.0440.03450.80
7.2.50.1200.04050.75
7.2.40.1090.04750.40
7.2.30.1340.04250.70
7.2.20.1300.03250.64
7.2.10.1020.04350.74
7.2.00.0810.04151.79
7.1.250.0720.05949.70
7.1.70.0100.02650.77
7.1.60.0130.05251.46
7.1.50.0200.05350.93
7.1.00.0030.11756.28
7.0.200.1050.02350.60
7.0.140.0100.11056.08
7.0.120.0130.11056.05
7.0.60.0170.12352.89
7.0.50.0200.07750.76
7.0.40.0200.06749.57
7.0.30.0100.07049.59
7.0.20.0170.06349.56
7.0.10.0130.07049.50
7.0.00.0200.06349.55
5.6.280.0170.15785.53
5.6.210.0300.15385.24
5.6.200.0370.15082.70
5.6.190.0200.10782.77
5.6.180.0170.10382.65
5.6.170.0170.10082.67
5.6.160.0230.09382.73
5.6.150.0230.09082.82
5.6.140.0230.09382.77
5.6.130.0100.10382.77
5.6.120.0230.10082.79
5.6.110.0130.10382.75
5.6.100.0070.11782.81
5.6.90.0130.10382.78
5.6.80.0200.13082.15
5.6.70.0330.14382.10
5.6.60.0230.14382.13
5.6.50.0400.11382.16
5.6.40.0400.12782.05
5.6.30.0130.12382.19
5.6.20.0230.16082.11
5.6.10.0300.09082.15
5.6.00.0400.15382.07
5.5.350.0300.13785.11
5.5.340.0230.15782.61
5.5.330.0200.10082.58
5.5.320.0230.09782.60
5.5.310.0270.09082.62
5.5.300.0130.10082.56
5.5.290.0230.10082.38
5.5.280.0230.09382.55
5.5.270.0170.10382.46
5.5.260.0230.09382.61
5.5.250.0200.11382.39
5.5.240.0200.16381.99
5.5.230.0200.16381.88
5.5.220.0200.15081.90
5.5.210.0370.09081.95
5.5.200.0330.10081.88
5.5.190.0070.15081.73
5.5.180.0330.15081.89
5.5.160.0400.14381.92
5.5.150.0200.10381.87
5.5.140.0330.14381.72
5.5.130.0300.11781.91
5.5.120.0370.11381.88
5.5.110.0470.12781.86
5.5.100.0570.10381.88
5.5.90.0330.10081.83
5.5.80.0300.11381.80
5.5.70.0200.11081.74
5.5.60.0400.11081.85
5.5.50.0300.14081.87
5.5.40.0100.15381.87
5.5.30.0270.14081.84
5.5.20.0330.08781.76
5.5.10.0400.13781.77
5.5.00.0400.14081.75
5.4.450.0330.160148.94
5.4.440.0230.167148.71
5.4.430.0230.167148.83
5.4.420.0300.160148.71
5.4.410.0500.150148.71
5.4.400.0470.150148.59
5.4.390.0370.193148.55
5.4.380.0300.210148.38
5.4.370.0370.217148.44
5.4.360.0600.203148.50
5.4.350.0400.170148.41
5.4.340.0500.203148.47
5.4.320.0530.160148.36
5.4.310.0530.217148.46
5.4.300.0530.217148.42
5.4.290.0530.210148.54
5.4.280.0370.230148.43
5.4.270.0430.223148.54
5.4.260.0570.197148.54
5.4.250.0530.197148.30
5.4.240.0570.203148.50
5.4.230.0470.207148.34
5.4.220.0430.220148.40
5.4.210.0430.187148.48
5.4.200.0430.150148.46
5.4.190.0470.207148.46
5.4.180.0400.157148.59
5.4.170.0730.167148.30
5.4.160.0200.180148.36
5.4.150.0330.170148.59
5.4.140.0470.217145.78
5.4.130.0570.193145.56
5.4.120.0400.213145.79
5.4.110.0500.213145.89
5.4.100.0400.217145.80
5.4.90.0600.190145.77
5.4.80.0500.203145.77
5.4.70.0530.213145.75
5.4.60.0430.213145.75
5.4.50.0570.203145.70
5.4.40.0570.197145.67
5.4.30.0370.200145.76
5.4.20.0500.193145.76
5.4.10.0270.180145.78
5.4.00.0570.187145.12
5.3.290.0400.227141.63
5.3.280.0330.170141.55
5.3.270.0330.177141.39
5.3.260.0370.223141.55
5.3.250.0530.247141.45
5.3.240.0270.180141.59
5.3.230.0400.167141.60
5.3.220.0430.200141.54
5.3.210.0300.230141.52
5.3.200.0400.210141.57
5.3.190.0500.167141.57
5.3.180.0600.210141.50
5.3.170.0330.203141.52
5.3.160.0270.207141.59
5.3.150.0430.227141.41
5.3.140.0470.217141.37
5.3.130.0470.217141.52
5.3.120.0300.247141.52
5.3.110.0370.180141.36
5.3.100.0270.237141.05
5.3.90.0300.210142.18
5.3.80.0430.170140.92
5.3.70.0530.217140.92
5.3.60.0330.223140.96
5.3.50.0470.217140.83
5.3.40.0470.223140.74
5.3.30.0370.220142.08
5.3.20.0530.200140.64
5.3.10.0270.187140.53
5.3.00.0230.190140.61
5.2.170.0370.217138.69
5.2.160.0670.217138.51
5.2.150.0470.243138.71
5.2.140.0500.243138.71
5.2.130.0230.200138.58
5.2.120.0370.237138.62
5.2.110.0570.170138.46
5.2.100.0370.193138.67
5.2.90.0430.247138.57
5.2.80.0530.227138.57
5.2.70.0530.243138.66
5.2.60.0430.237138.61
5.2.50.0470.267138.47
5.2.40.0400.303138.46
5.2.30.0400.303138.54
5.2.20.0470.297138.43
5.2.10.0470.217138.48
5.2.00.0700.190140.38
5.1.60.0470.243185.54
5.1.50.0870.237185.58
5.1.40.0670.243185.62
5.1.30.0730.227185.82
5.1.20.0800.240185.94
5.1.10.0600.243185.71
5.1.00.0530.250185.62
5.0.50.0570.287184.11
5.0.40.0530.353184.07
5.0.30.0470.350183.76
5.0.20.0470.280183.59
5.0.10.0500.343183.67
5.0.00.0500.350183.74
4.4.90.0470.353181.59
4.4.80.0530.340181.55
4.4.70.0500.330181.56
4.4.60.0770.310181.55
4.4.50.0500.337181.53
4.4.40.0700.293181.52
4.4.30.0730.300181.58
4.4.20.0670.297181.65
4.4.10.0670.323181.66
4.4.00.0630.327181.62
4.3.110.0600.330181.45
4.3.100.0430.337181.53
4.3.90.0600.277181.49
4.3.80.0700.340181.41
4.3.70.0400.353181.45
4.3.60.0570.330181.40
4.3.50.0500.330181.42
4.3.40.0500.347181.37
4.3.30.0600.330180.18
4.3.20.0400.287180.21
4.3.10.0430.317180.15
4.3.00.0430.317180.18

preferences:
33.73 ms | 401 KiB | 5 Q