3v4l.org

run code in 300+ PHP versions simultaneously
<?php $one = $two = $three = 0; for($i=0;$i<1000;$i++) { $c = mt_rand(1,3); if($c == 1) { $one++; } elseif($c == 2) { $two++; } elseif($c=3) { $three++; } } echo "one {$one}; two {$two}; three {$three}";

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.4.10.0120.00615.11
7.4.00.0080.00815.22
7.3.130.0140.00414.77
7.3.120.0030.00814.87
7.3.110.0150.00314.93
7.3.100.0100.00714.56
7.3.90.0030.00914.79
7.3.80.0080.00314.68
7.3.70.0080.00014.44
7.3.60.0090.00614.61
7.3.50.0040.01514.96
7.3.40.0110.00314.90
7.3.30.0070.01014.74
7.3.20.0030.00616.52
7.3.10.0100.00316.63
7.3.00.0000.01416.63
7.2.260.0070.01114.81
7.2.250.0070.01015.20
7.2.240.0070.01114.98
7.2.230.0090.00615.09
7.2.220.0130.00314.96
7.2.210.0030.01314.94
7.2.200.0070.01014.93
7.2.190.0080.00814.83
7.2.180.0040.00815.01
7.2.170.0000.01114.96
7.2.160.0000.01714.82
7.2.150.0130.00316.97
7.2.140.0040.01116.94
7.2.130.0000.01416.91
7.2.120.0000.01516.94
7.2.110.0090.00616.84
7.2.100.0000.01016.75
7.2.90.0070.00717.02
7.2.80.0030.01216.93
7.2.70.0070.00716.79
7.2.60.0030.00616.71
7.2.50.0120.00416.63
7.2.40.0030.01017.02
7.2.30.0040.01116.86
7.2.20.0070.00716.54
7.2.10.0060.00616.39
7.2.00.0020.01218.20
7.1.330.0090.00615.98
7.1.320.0130.00015.64
7.1.310.0040.01215.46
7.1.300.0040.00815.55
7.1.290.0080.00815.83
7.1.280.0040.00715.60
7.1.270.0100.00015.61
7.1.260.0030.01415.71
7.1.250.0040.00715.71
7.1.240.0070.01015.77
7.1.230.0040.00415.65
7.1.220.0050.00515.79
7.1.210.0000.01015.43
7.1.200.0000.00915.45
7.1.190.0030.01215.83
7.1.180.0070.00715.63
7.1.170.0030.00715.64
7.1.160.0000.01315.70
7.1.150.0090.00315.85
7.1.140.0040.00815.63
7.1.130.0070.00715.84
7.1.120.0030.01015.55
7.1.110.0080.00615.61
7.1.100.0110.00415.95
7.1.90.0110.00415.43
7.1.80.0060.01015.73
7.1.70.0050.00316.43
7.1.60.0100.00517.63
7.1.50.0070.01316.12
7.1.40.0070.00715.33
7.1.30.0000.01515.77
7.1.20.0040.01115.63
7.1.10.0060.00315.92
7.1.00.0070.03819.02
7.0.330.0030.00615.39
7.0.320.0100.00315.38
7.0.310.0070.00715.50
7.0.300.0110.00015.29
7.0.290.0030.01015.06
7.0.280.0030.01015.36
7.0.270.0030.00714.94
7.0.260.0110.00315.39
7.0.250.0090.00615.15
7.0.240.0040.01215.38
7.0.230.0110.00415.48
7.0.220.0110.00315.43
7.0.210.0070.01015.04
7.0.200.0030.01015.08
7.0.190.0060.01315.39
7.0.180.0040.00715.29
7.0.170.0070.00715.43
7.0.160.0030.01415.48
7.0.150.0110.00315.12
7.0.140.0060.03718.75
7.0.130.0140.00015.27
7.0.120.0140.00015.49
7.0.110.0000.01415.32
7.0.100.0060.00615.48
7.0.90.0030.01015.58
7.0.80.0000.01415.46
7.0.70.0060.00615.40
7.0.60.0050.03717.70
7.0.50.0050.03516.44
7.0.40.0030.02516.77
7.0.30.0250.03816.83
7.0.20.0130.03316.66
7.0.10.0030.02816.66
7.0.00.0070.03416.70
5.6.400.0050.00514.62
5.6.390.0000.01414.30
5.6.380.0080.00813.84
5.6.370.0070.00714.24
5.6.360.0060.00314.61
5.6.350.0040.01114.18
5.6.340.0060.00914.10
5.6.330.0040.01114.13
5.6.320.0060.00614.55
5.6.310.0040.01114.25
5.6.300.0030.01014.08
5.6.290.0040.01114.41
5.6.280.0000.04217.63
5.6.270.0030.00914.18
5.6.260.0040.01114.55
5.6.250.0070.00714.40
5.6.240.0100.00714.37
5.6.230.0070.00713.88
5.6.220.0030.00614.13
5.6.210.0090.04417.43
5.6.200.0030.04616.13
5.6.190.0080.04917.42
5.6.180.0300.03817.32
5.6.170.0230.03617.38
5.6.160.0020.04317.26
5.6.150.0120.03216.28
5.6.140.0130.04016.13
5.6.130.0120.02816.15
5.6.120.0050.03317.46
5.6.110.0110.04417.78
5.6.100.0050.04817.58
5.6.90.0000.03917.56
5.6.80.0120.03817.19
5.6.70.0000.01414.36
5.6.60.0030.01314.19
5.6.50.0000.01614.30
5.6.40.0000.01614.28
5.6.30.0040.01114.20
5.6.20.0100.00313.99
5.6.10.0000.01013.93
5.6.00.0110.00714.30
5.5.380.0040.00413.95
5.5.370.0090.00614.03
5.5.360.0000.01314.26
5.5.350.0100.03717.38
5.5.340.0060.03116.06
5.5.330.0020.05317.24
5.5.320.0140.02417.32
5.5.310.0170.02517.09
5.5.300.0060.03115.99
5.5.290.0090.03416.03
5.5.280.0050.04417.46
5.5.270.0080.04417.53
5.5.260.0080.04317.44
5.5.250.0050.04117.43
5.5.240.0160.03817.23
5.5.230.0170.00014.13
5.5.220.0090.00914.07
5.5.210.0000.01414.46
5.5.200.0030.01014.06
5.5.190.0060.00614.50
5.5.180.0030.00614.07
5.5.170.0040.01113.92
5.5.160.0060.00614.11
5.5.150.0070.01014.32
5.5.140.0040.01113.98
5.5.130.0090.00614.11
5.5.120.0000.01414.04
5.5.110.0060.01014.14
5.5.100.0070.00414.33
5.5.90.0080.00414.15
5.5.80.0090.00614.30
5.5.70.0100.00313.89
5.5.60.0040.01414.27
5.5.50.0000.01114.22
5.5.40.0000.01314.04
5.5.30.0030.01014.02
5.5.20.0050.00514.00
5.5.10.0000.01413.75
5.5.00.0060.01014.31
5.4.450.0180.03816.16
5.4.440.0140.02216.16
5.4.430.0130.04316.22
5.4.420.0180.04016.18
5.4.410.0200.03615.99
5.4.400.0200.03516.08
5.4.390.0210.04116.06
5.4.380.0170.03416.07
5.4.370.0130.04415.84
5.4.360.0210.03915.91
5.4.350.0200.03216.05
5.4.340.0180.03315.91
5.4.330.0030.01012.90
5.4.320.0200.03216.02
5.4.310.0180.02116.02
5.4.300.0150.02916.08
5.4.290.0150.03716.01
5.4.280.0220.02715.98
5.4.270.0130.04015.98
5.4.260.0180.03515.89
5.4.250.0160.04115.99
5.4.240.0240.03416.01
5.4.230.0150.04515.99
5.4.220.0120.02816.01
5.4.210.0170.04016.07
5.4.200.0220.02016.07
5.4.190.0190.02316.07
5.4.180.0160.04015.99
5.4.170.0150.02315.99
5.4.160.0160.02315.84
5.4.150.0130.04415.99
5.4.140.0120.04214.68
5.4.130.0140.02514.62
5.4.120.0200.03014.67
5.4.110.0130.04414.48
5.4.100.0200.03614.66
5.4.90.0200.03014.66
5.4.80.0190.03714.67
5.4.70.0190.03314.61
5.4.60.0210.02714.68
5.4.50.0220.03514.66
5.4.40.0210.02214.59
5.4.30.0130.02714.69
5.4.20.0180.04014.54
5.4.10.0210.03214.69
5.4.00.0150.03314.40
5.3.290.0330.07314.46
5.3.280.0300.07314.54
5.3.270.0270.04314.43
5.3.260.0270.03714.70
5.3.250.0270.04314.45
5.3.240.0330.06714.46
5.3.230.0270.07714.54
5.3.220.0370.04714.44
5.3.210.0270.05014.40
5.3.200.0330.06714.39
5.3.190.0400.06014.61
5.3.180.0300.06714.65
5.3.170.0430.04314.40
5.3.160.0270.06014.43
5.3.150.0270.06314.61
5.3.140.0300.04714.60
5.3.130.0330.06714.59
5.3.120.0330.03314.45
5.3.110.0300.05014.42
5.3.100.0270.03714.02
5.3.90.0200.04314.05
5.3.80.0170.04313.89
5.3.70.0300.03014.00
5.3.60.0200.04013.86
5.3.50.0170.04013.89
5.3.40.0070.04713.74
5.3.30.0230.03014.00
5.3.20.0200.04013.78
5.3.10.0130.04013.51
5.3.00.0130.04013.58
5.2.170.0100.03312.20
5.2.160.0130.03312.20
5.2.150.0130.03012.20
5.2.140.0200.02312.20
5.2.130.0130.02712.20
5.2.120.0200.05712.20
5.2.110.0170.02712.20
5.2.100.0200.02312.20
5.2.90.0100.03012.20
5.2.80.0070.03712.20
5.2.70.0170.02712.20
5.2.60.0130.03012.20
5.2.50.0130.03012.20
5.2.40.0100.03012.20
5.2.30.0130.02712.20
5.2.20.0130.03012.20
5.2.10.0170.02312.20
5.2.00.0070.03012.20
5.1.60.0200.01712.20
5.1.50.0100.02712.20
5.1.40.0070.03012.20
5.1.30.0100.02712.20
5.1.20.0130.02312.20
5.1.10.0170.02012.20
5.1.00.0100.03012.20
5.0.50.0070.02012.20
5.0.40.0100.02012.20
5.0.30.0030.03312.20
5.0.20.0130.03312.20
5.0.10.0100.04712.20
5.0.00.0100.05012.20
4.4.90.0070.01312.20
4.4.80.0070.01312.20
4.4.70.0070.01712.20
4.4.60.0030.01712.20
4.4.50.0070.01312.20
4.4.40.0030.03012.20
4.4.30.0030.02012.20
4.4.20.0070.01712.20
4.4.10.0030.01712.20
4.4.00.0030.02712.20
4.3.110.0030.01712.20
4.3.100.0070.01312.20
4.3.90.0100.03012.20
4.3.80.0100.05312.20
4.3.70.0070.02312.20
4.3.60.0100.02012.20
4.3.50.0130.03312.20
4.3.40.0170.02312.20
4.3.30.0070.01712.20
4.3.20.0070.03712.20
4.3.10.0070.03312.20
4.3.00.0100.02712.20

preferences:
54.26 ms | 401 KiB | 5 Q