3v4l.org

run code in 300+ PHP versions simultaneously
<?php for($i=0;$i>100;$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.0070.01115.14
7.4.00.0120.00514.80
7.3.130.0030.01614.74
7.3.120.0070.01114.84
7.3.110.0060.01314.69
7.3.100.0070.01214.61
7.3.90.0070.00514.70
7.3.80.0070.00414.88
7.3.70.0050.00514.81
7.3.60.0100.00414.87
7.3.50.0060.00914.77
7.3.40.0070.00514.76
7.3.30.0040.01014.87
7.3.20.0070.00816.52
7.3.10.0100.00216.58
7.3.00.0050.00616.59
7.2.260.0070.01114.89
7.2.250.0050.01214.90
7.2.240.0050.00914.80
7.2.230.0030.01314.96
7.2.220.0060.00614.77
7.2.210.0080.00714.91
7.2.200.0050.00714.80
7.2.190.0100.00314.87
7.2.180.0020.01314.82
7.2.170.0070.00914.89
7.2.160.0040.00414.67
7.2.150.0000.01016.81
7.2.140.0030.01016.71
7.2.130.0070.00816.82
7.2.120.0070.00816.73
7.2.110.0060.00616.71
7.2.100.0040.01016.71
7.2.90.0070.00716.86
7.2.80.0100.00516.90
7.2.70.0070.00616.72
7.2.60.0080.00616.72
7.2.50.0060.01016.92
7.2.40.0060.00816.78
7.2.30.0060.00616.74
7.2.20.0030.01116.87
7.2.10.0070.00916.72
7.2.00.0040.01116.68
7.1.330.0080.00615.72
7.1.320.0060.00815.73
7.1.310.0070.00615.69
7.1.300.0100.00315.55
7.1.290.0110.00215.53
7.1.280.0060.01015.66
7.1.270.0050.00615.58
7.1.260.0070.00515.65
7.1.250.0070.00615.70
7.1.240.0000.01415.66
7.1.230.0000.01015.59
7.1.220.0040.00915.78
7.1.210.0000.01115.51
7.1.200.0040.00715.48
7.1.190.0030.01015.40
7.1.180.0030.00915.59
7.1.170.0120.00315.44
7.1.160.0110.00415.44
7.1.150.0100.00015.80
7.1.140.0030.00715.81
7.1.130.0030.01015.59
7.1.120.0060.00915.71
7.1.110.0090.00415.96
7.1.100.0000.01415.61
7.1.90.0070.00715.62
7.1.80.0030.01315.68
7.1.70.0020.00716.36
7.1.60.0020.01317.56
7.1.50.0060.01316.34
7.1.40.0040.01115.60
7.1.30.0030.01015.42
7.1.20.0070.00315.89
7.1.10.0060.01215.48
7.1.00.0070.03918.81
7.0.330.0090.00315.63
7.0.320.0000.01115.41
7.0.310.0000.01515.12
7.0.300.0060.00314.93
7.0.290.0070.00715.45
7.0.280.0000.01115.32
7.0.270.0070.00715.09
7.0.260.0090.00615.38
7.0.250.0040.00415.56
7.0.240.0030.00915.42
7.0.230.0000.01515.37
7.0.220.0000.01315.58
7.0.210.0080.00015.38
7.0.200.0030.00714.95
7.0.190.0070.00715.39
7.0.180.0000.01315.16
7.0.170.0030.00715.43
7.0.160.0070.00715.30
7.0.150.0030.00715.40
7.0.140.0020.04418.77
7.0.130.0030.01015.54
7.0.120.0100.00315.43
7.0.110.0040.00815.50
7.0.100.0070.00415.32
7.0.90.0080.00015.48
7.0.80.0030.01015.56
7.0.70.0070.00715.20
7.0.60.0150.03717.64
7.0.50.0050.02716.64
7.0.40.0070.04216.75
7.0.30.0180.03116.88
7.0.20.0150.02416.77
7.0.10.0070.04716.79
7.0.00.0140.03916.79
5.6.400.0050.00514.25
5.6.390.0060.00814.51
5.6.380.0030.00614.65
5.6.370.0060.00614.50
5.6.360.0030.01014.61
5.6.350.0000.01014.18
5.6.340.0070.00714.66
5.6.330.0000.01614.41
5.6.320.0060.00614.61
5.6.310.0060.00614.27
5.6.300.0030.01014.24
5.6.290.0070.00714.31
5.6.280.0060.03917.68
5.6.270.0030.00914.18
5.6.260.0030.00914.55
5.6.250.0100.00314.23
5.6.240.0070.00714.44
5.6.230.0080.00814.55
5.6.220.0000.01514.39
5.6.210.0020.02717.44
5.6.200.0050.04816.16
5.6.190.0070.04017.26
5.6.180.0230.03917.33
5.6.170.0160.04417.47
5.6.160.0030.03617.34
5.6.150.0070.02616.26
5.6.140.0090.04516.16
5.6.130.0030.02516.15
5.6.120.0080.04417.65
5.6.110.0090.04117.59
5.6.100.0030.04317.70
5.6.90.0060.02317.71
5.6.80.0090.02917.23
5.6.70.0100.00314.41
5.6.60.0040.00714.31
5.6.50.0070.00314.23
5.6.40.0000.01114.00
5.6.30.0040.01114.01
5.6.20.0120.00614.16
5.6.10.0000.01214.49
5.6.00.0030.00714.05
5.5.380.0070.01014.25
5.5.370.0110.00414.36
5.5.360.0070.00714.15
5.5.350.0070.02717.32
5.5.340.0050.04616.27
5.5.330.0050.04517.13
5.5.320.0130.02517.33
5.5.310.0170.04317.36
5.5.300.0080.02016.21
5.5.290.0050.04716.06
5.5.280.0050.02517.52
5.5.270.0070.03117.51
5.5.260.0140.03717.61
5.5.250.0040.02417.41
5.5.240.0110.03917.08
5.5.230.0060.00613.82
5.5.220.0040.01113.81
5.5.210.0030.00614.15
5.5.200.0060.00314.01
5.5.190.0000.01614.09
5.5.180.0070.01113.97
5.5.170.0040.00814.02
5.5.160.0030.01013.79
5.5.150.0030.01014.28
5.5.140.0030.01214.38
5.5.130.0030.01214.20
5.5.120.0030.01014.33
5.5.110.0080.00614.29
5.5.100.0060.00614.07
5.5.90.0130.00314.27
5.5.80.0090.00913.77
5.5.70.0030.01314.36
5.5.60.0060.00614.18
5.5.50.0030.01014.28
5.5.40.0100.00314.32
5.5.30.0000.01014.04
5.5.20.0110.00414.20
5.5.10.0000.01114.06
5.5.00.0050.00514.36
5.4.450.0110.03015.96
5.4.440.0400.03315.95
5.4.430.0210.02015.71
5.4.420.0100.02515.89
5.4.410.0240.02415.67
5.4.400.0340.02015.71
5.4.390.0170.02515.78
5.4.380.0200.02915.55
5.4.370.0170.02815.48
5.4.360.0150.03215.41
5.4.350.0170.03115.37
5.4.340.0190.02615.54
5.4.330.0060.00312.33
5.4.320.0050.02412.39
5.4.310.0050.02112.39
5.4.300.0100.02212.39
5.4.290.0060.02212.39
5.4.280.0080.02012.34
5.4.270.0070.01912.34
5.4.260.0060.02812.34
5.4.250.0080.02012.34
5.4.240.0020.02912.34
5.4.230.0020.02412.34
5.4.220.0060.02012.34
5.4.210.0060.02312.34
5.4.200.0060.02312.34
5.4.190.0080.02012.33
5.4.180.0020.02412.34
5.4.170.0030.02312.34
5.4.160.0040.01912.34
5.4.150.0020.02512.34
5.4.140.0040.02212.18
5.4.130.0040.02112.17
5.4.120.0030.02012.15
5.4.110.0070.01712.15
5.4.100.0080.01812.15
5.4.90.0030.02312.15
5.4.80.0020.02212.15
5.4.70.0060.02112.15
5.4.60.0080.02012.14
5.4.50.0060.02112.15
5.4.40.0020.02012.14
5.4.30.0060.02112.14
5.4.20.0050.01912.14
5.4.10.0050.02012.14
5.4.00.0020.02411.88
5.3.290.0100.03412.80
5.3.280.0060.04012.71
5.3.270.0070.03712.72
5.3.260.0070.04112.72
5.3.250.0090.03712.72
5.3.240.0120.03212.72
5.3.230.0060.03812.70
5.3.220.0040.04312.68
5.3.210.0050.04112.68
5.3.200.0040.03812.68
5.3.190.0110.03712.68
5.3.180.0100.03712.68
5.3.170.0080.03712.67
5.3.160.0100.03212.67
5.3.150.0060.04112.68
5.3.140.0060.03612.66
5.3.130.0020.04312.66
5.3.120.0080.03612.66
5.3.110.0080.04212.66
5.3.100.0090.04312.11
5.3.90.0090.03712.09
5.3.80.0070.03912.07
5.3.70.0060.03512.07
5.3.60.0060.04212.07
5.3.50.0110.03712.00
5.3.40.0060.03612.00
5.3.30.0050.03611.94
5.3.20.0040.03711.72
5.3.10.0050.03611.69
5.3.00.0040.04311.67
5.2.170.0050.0319.18
5.2.160.0070.0269.18
5.2.150.0060.0299.18
5.2.140.0030.0329.17
5.2.130.0040.0319.14
5.2.120.0040.0299.14
5.2.110.0040.0319.14
5.2.100.0060.0279.14
5.2.90.0060.0359.14
5.2.80.0050.0339.13
5.2.70.0040.0319.13
5.2.60.0030.0329.09
5.2.50.0100.0369.06
5.2.40.0050.0309.03
5.2.30.0040.0309.01
5.2.20.0030.0299.00
5.2.10.0030.0338.92
5.2.00.0060.0298.77
5.1.60.0020.0258.06
5.1.50.0030.0258.06
5.1.40.0030.0348.04
5.1.30.0030.0278.39
5.1.20.0030.0288.41
5.1.10.0060.0238.14
5.1.00.0050.0318.14
5.0.50.0040.0206.61
5.0.40.0030.0206.47
5.0.30.0040.0316.29
5.0.20.0060.0166.26
5.0.10.0050.0206.23
5.0.00.0040.0326.23
4.4.90.0030.0204.78
4.4.80.0030.0154.75
4.4.70.0020.0164.75
4.4.60.0030.0144.75
4.4.50.0030.0184.77
4.4.40.0050.0224.71
4.4.30.0020.0164.76
4.4.20.0040.0144.84
4.4.10.0030.0154.85
4.4.00.0030.0244.76
4.3.110.0040.0174.67
4.3.100.0050.0154.67
4.3.90.0020.0144.64
4.3.80.0060.0224.58
4.3.70.0080.0174.63
4.3.60.0040.0184.62
4.3.50.0040.0134.63
4.3.40.0020.0244.54
4.3.30.0030.0153.28
4.3.20.0020.0153.25
4.3.10.0020.0143.21
4.3.00.0000.02016.72

preferences:
40.15 ms | 400 KiB | 5 Q