3v4l.org

run code in 300+ PHP versions simultaneously
<?php $test = array(); $i = 10000; while ($i--) { $test[] = mt_rand(0,99999); } class Foo { public function __construct ($input) { echo $input[array_rand($input)] + 1; } }

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.1.70.0030.00617.14
7.1.60.0100.01419.17
7.1.50.0110.01416.80
7.1.00.0030.04322.28
7.0.200.0000.00816.48
7.0.140.0070.07322.08
7.0.100.0530.06720.38
7.0.90.0500.07720.34
7.0.80.0470.08320.15
7.0.70.0270.07020.19
7.0.60.0230.04020.26
7.0.50.0230.03320.61
7.0.40.0070.04020.00
7.0.30.0100.07020.00
7.0.20.0070.04020.18
7.0.10.0100.08020.04
7.0.00.0030.05020.14
5.6.280.0030.08022.21
5.6.250.0100.08021.89
5.6.240.0100.08321.98
5.6.230.0170.07721.98
5.6.220.0100.07321.88
5.6.210.0030.09021.76
5.6.200.0070.08022.34
5.6.190.0000.05022.24
5.6.180.0070.07722.36
5.6.170.0100.04022.25
5.6.160.0070.04022.29
5.6.150.0130.08322.31
5.6.140.0030.06022.36
5.6.130.0030.05322.32
5.6.120.0070.04322.46
5.6.110.0000.05022.32
5.6.100.0000.04722.24
5.6.90.0030.05022.30
5.6.80.0100.04021.66
5.6.70.0100.03721.70
5.6.60.0030.05721.84
5.6.50.0070.04321.76
5.6.40.0100.03721.57
5.6.30.0070.04021.77
5.6.20.0000.07721.73
5.6.10.0100.08021.66
5.6.00.0070.08321.80
5.5.380.0170.07021.68
5.5.370.0030.06021.70
5.5.360.0130.07721.61
5.5.350.0100.04321.75
5.5.340.0030.04321.93
5.5.330.0070.04022.02
5.5.320.0100.03722.20
5.5.310.0030.06722.19
5.5.300.0000.04722.05
5.5.290.0070.05022.05
5.5.280.0030.04322.02
5.5.270.0070.06022.08
5.5.260.0030.04322.01
5.5.250.0000.04721.93
5.5.240.0030.04021.59
5.5.230.0070.04721.43
5.5.220.0100.04721.54
5.5.210.0030.04721.43
5.5.200.0070.03721.41
5.5.190.0100.06321.52
5.5.180.0100.06321.50
5.5.160.0100.08321.55
5.5.150.0100.07721.47
5.5.140.0070.08021.39
5.5.130.0170.08021.37
5.5.120.0070.09321.41
5.5.110.0130.07321.55
5.5.100.0070.08721.45
5.5.90.0030.08321.44
5.5.80.0130.04321.39
5.5.70.0070.08721.36
5.5.60.0070.08321.38
5.5.50.0170.07321.25
5.5.40.0100.05721.38
5.5.30.0130.06321.31
5.5.20.0070.07721.38
5.5.10.0070.08321.39
5.5.00.0000.08321.32
5.4.450.0070.04020.40
5.4.440.0070.05020.61
5.4.430.0070.05020.43
5.4.420.0130.03320.60
5.4.410.0170.05720.60
5.4.400.0070.03720.29
5.4.390.0070.05020.34
5.4.380.0000.04320.26
5.4.370.0070.04020.34
5.4.360.0100.04020.24
5.4.350.0100.05320.23
5.4.340.0000.08720.26
5.4.320.0030.08320.40
5.4.310.0230.06320.22
5.4.300.0100.07320.33
5.4.290.0300.03020.23
5.4.280.0000.08720.26
5.4.270.0100.08020.33
5.4.260.0100.07320.25
5.4.250.0170.07020.33
5.4.240.0100.07320.43
5.4.230.0130.07020.23
5.4.220.0100.07720.04
5.4.210.0030.08320.32
5.4.200.0200.07320.25
5.4.190.0030.08320.23
5.4.180.0130.08020.39
5.4.170.0130.07720.25
5.4.160.0100.07720.21
5.4.150.0030.05320.32
5.4.140.0100.07317.76
5.4.130.0130.07017.61
5.4.120.0070.04317.50
5.4.110.0170.05317.54
5.4.100.0100.07317.82
5.4.90.0100.07017.57
5.4.80.0100.07717.72
5.4.70.0070.07717.59
5.4.60.0130.07717.57
5.4.50.0070.07317.52
5.4.40.0130.04017.54
5.4.30.0070.08017.57
5.4.20.0070.07717.53
5.4.10.0130.06717.54
5.4.00.0170.06717.07
5.3.290.0030.07715.89
5.3.280.0100.08015.68
5.3.270.0130.07015.73
5.3.260.0100.08015.86
5.3.250.0100.07715.76
5.3.240.0170.06715.84
5.3.230.0000.08715.68
5.3.220.0070.07015.75
5.3.210.0130.06715.61
5.3.200.0130.07315.75
5.3.190.0030.08015.61
5.3.180.0100.07015.68
5.3.170.0070.07315.76
5.3.160.0070.08015.71
5.3.150.0030.08015.57
5.3.140.0270.03715.79
5.3.130.0100.08015.76
5.3.120.0070.07715.68
5.3.110.0100.07015.69
5.3.100.0100.07715.09
5.3.90.0130.06315.12
5.3.80.0130.07315.11
5.3.70.0100.07315.51
5.3.60.0030.08715.10
5.3.50.0030.06315.44
5.3.40.0030.07015.14
5.3.30.0100.07714.99
5.3.20.0000.05314.89
5.3.10.0100.07314.73
5.3.00.0030.05314.89
5.2.170.0000.07014.30
5.2.160.0000.07014.30
5.2.150.0030.05714.30
5.2.140.0070.06314.30
5.2.130.0100.06314.30
5.2.120.0030.06714.30
5.2.110.0030.06714.30
5.2.100.0070.06314.30
5.2.90.0130.05714.30
5.2.80.0000.07014.30
5.2.70.0000.07014.30
5.2.60.0100.06014.30
5.2.50.0070.06014.30
5.2.40.0100.02714.30
5.2.30.0070.05314.30
5.2.20.0030.06714.30
5.2.10.0100.06314.30
5.2.00.0070.06314.30
5.1.60.0070.03314.30
5.1.50.0100.02714.30
5.1.40.0070.04714.30
5.1.30.0070.06314.30
5.1.20.0030.06314.30
5.1.10.0070.05714.30
5.1.00.0030.06014.30
5.0.50.0100.05014.30
5.0.40.0100.04314.30
5.0.30.0030.07014.30
5.0.20.0070.04314.30
5.0.10.0070.04014.30
5.0.00.0030.07714.30
4.4.90.0030.02714.30
4.4.80.0030.02314.30
4.4.70.0030.03314.30
4.4.60.0030.03714.30
4.4.50.0000.03714.30
4.4.40.0100.04314.30
4.4.30.0000.04014.30
4.4.20.0000.04014.30
4.4.10.0000.04014.30
4.4.00.0030.05314.30
4.3.110.0030.03314.30
4.3.100.0070.03014.30
4.3.90.0030.03314.30
4.3.80.0030.05714.30
4.3.70.0100.02714.30
4.3.60.0070.02314.30
4.3.50.0030.03314.30
4.3.40.0100.03314.30
4.3.30.0000.03714.30
4.3.20.0030.03714.30
4.3.10.0030.03314.30
4.3.00.0000.03014.30

preferences:
34.51 ms | 401 KiB | 5 Q