3v4l.org

run code in 300+ PHP versions simultaneously
<?php $one = $two = $three = 0; 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.0060.01214.97
7.4.00.0050.01214.92
7.3.130.0090.01014.68
7.3.120.0090.00714.65
7.3.110.0120.00714.83
7.3.100.0040.01114.90
7.3.90.0050.00814.78
7.3.80.0020.01114.69
7.3.70.0040.00814.67
7.3.60.0060.00814.81
7.3.50.0040.00814.68
7.3.40.0050.01114.66
7.3.30.0050.00714.69
7.3.20.0050.00616.59
7.3.10.0080.00616.43
7.3.00.0050.00816.58
7.2.260.0110.00915.14
7.2.250.0040.01515.04
7.2.240.0060.00814.98
7.2.230.0050.00715.06
7.2.220.0090.00914.94
7.2.210.0060.00614.95
7.2.200.0040.00714.99
7.2.190.0050.00914.98
7.2.180.0110.00614.91
7.2.170.0070.00915.03
7.2.160.0040.01014.91
7.2.150.0060.00916.73
7.2.140.0080.00616.66
7.2.130.0020.01116.67
7.2.120.0050.00716.83
7.2.110.0060.00616.79
7.2.100.0030.00716.70
7.2.90.0070.00816.86
7.2.80.0030.00916.78
7.2.70.0100.00716.62
7.2.60.0090.00616.64
7.2.50.0100.00616.71
7.2.40.0090.00716.94
7.2.30.0060.00916.75
7.2.20.0070.00716.50
7.2.10.0040.00616.72
7.2.00.0070.00916.62
7.1.330.0020.01215.75
7.1.320.0090.00715.71
7.1.310.0050.00915.60
7.1.300.0090.00615.49
7.1.290.0050.00715.60
7.1.280.0100.00215.50
7.1.270.0070.00315.64
7.1.260.0110.00315.65
7.1.250.0050.00515.52
7.1.240.0070.00615.62
7.1.230.0100.00315.47
7.1.220.0050.00715.67
7.1.210.0110.00515.53
7.1.200.0100.00515.51
7.1.190.0050.00715.67
7.1.180.0090.00415.60
7.1.170.0040.00915.62
7.1.160.0070.00615.76
7.1.150.0040.00515.62
7.1.140.0050.00915.65
7.1.130.0070.00915.59
7.1.120.0090.00615.57
7.1.110.0050.00715.67
7.1.100.0050.00815.72
7.1.90.0080.00515.53
7.1.80.0040.00715.49
7.1.70.0050.00616.00
7.1.60.0080.00716.78
7.1.50.0110.00616.15
7.1.40.0060.00815.48
7.1.30.0020.01315.42
7.1.20.0030.00715.59
7.1.10.0070.00515.51
7.1.00.0060.03017.73
7.0.330.0040.00615.46
7.0.320.0030.00815.08
7.0.310.0060.00515.28
7.0.300.0030.00815.41
7.0.290.0030.00915.29
7.0.280.0030.00815.23
7.0.270.0050.01015.44
7.0.260.0050.00815.38
7.0.250.0040.00815.54
7.0.240.0050.00915.25
7.0.230.0070.00715.29
7.0.220.0040.00815.43
7.0.210.0020.01015.43
7.0.200.0390.00515.18
7.0.190.0060.00815.23
7.0.180.0050.00815.20
7.0.170.0060.00715.14
7.0.160.0070.00915.25
7.0.150.0030.00815.48
7.0.140.0060.02717.48
7.0.130.0050.00615.25
7.0.120.0040.00915.04
7.0.110.0040.00715.28
7.0.100.0020.00715.40
7.0.90.0050.01115.39
7.0.80.0040.01115.20
7.0.70.0050.01015.31
7.0.60.0060.02916.96
7.0.50.0030.02616.23
7.0.40.0030.03615.48
7.0.30.0170.02215.64
7.0.20.0110.03215.59
7.0.10.0060.03315.62
7.0.00.0030.03615.73
5.6.400.0060.00614.47
5.6.390.0070.00714.38
5.6.380.0080.00614.34
5.6.370.0020.01214.20
5.6.360.0080.00514.25
5.6.350.0040.00614.38
5.6.340.0060.00714.40
5.6.330.0070.00514.46
5.6.320.0100.00214.18
5.6.310.0090.00614.36
5.6.300.0070.00614.29
5.6.290.0040.00814.64
5.6.280.0060.02916.50
5.6.270.0030.00814.34
5.6.260.0050.00714.23
5.6.250.0020.01114.57
5.6.240.0080.00414.24
5.6.230.0080.00314.36
5.6.220.0070.00914.54
5.6.210.0060.01816.35
5.6.200.0050.03115.60
5.6.190.0070.02016.42
5.6.180.0210.02816.38
5.6.170.0120.03016.25
5.6.160.0110.02916.19
5.6.150.0040.02015.54
5.6.140.0090.02115.54
5.6.130.0080.02015.45
5.6.120.0040.02616.57
5.6.110.0090.02616.47
5.6.100.0030.02216.55
5.6.90.0100.03216.49
5.6.80.0080.01716.28
5.6.70.0060.00614.03
5.6.60.0050.00814.15
5.6.50.0010.00914.18
5.6.40.0100.00714.12
5.6.30.0090.00314.22
5.6.20.0050.00914.24
5.6.10.0090.00514.17
5.6.00.0050.00814.08
5.5.380.0030.01214.03
5.5.370.0040.00814.24
5.5.360.0050.00914.31
5.5.350.0100.02616.24
5.5.340.0110.02815.43
5.5.330.0030.02316.25
5.5.320.0100.03216.10
5.5.310.0170.02216.21
5.5.300.0050.02815.49
5.5.290.0060.02415.46
5.5.280.0040.02316.44
5.5.270.0080.03116.38
5.5.260.0070.03116.49
5.5.250.0030.02216.29
5.5.240.0070.03216.18
5.5.230.0070.00514.00
5.5.220.0090.00414.26
5.5.210.0020.01014.23
5.5.200.0060.00914.29
5.5.190.0080.00514.24
5.5.180.0060.00614.35
5.5.170.0070.00714.20
5.5.160.0050.00914.26
5.5.150.0050.01014.06
5.5.140.0110.00414.15
5.5.130.0070.00914.23
5.5.120.0050.00714.01
5.5.110.0050.00814.39
5.5.100.0060.00514.11
5.5.90.0030.01014.13
5.5.80.0060.00514.08
5.5.70.0080.00813.90
5.5.60.0090.00714.16
5.5.50.0080.00314.10
5.5.40.0050.01014.20
5.5.30.0040.00614.15
5.5.20.0050.00714.04
5.5.10.0040.00814.07
5.5.00.0080.00713.93
5.4.450.0160.01414.06
5.4.440.0110.02014.11
5.4.430.0190.01914.06
5.4.420.0120.02014.00
5.4.410.0270.02114.02
5.4.400.0100.01913.86
5.4.390.0180.01713.90
5.4.380.0140.02213.77
5.4.370.0180.02213.79
5.4.360.0130.02413.78
5.4.350.0080.02613.84
5.4.340.0140.02413.82
5.4.330.0030.00711.39
5.4.320.0080.01311.75
5.4.310.0030.02311.74
5.4.300.0040.01811.74
5.4.290.0070.01611.74
5.4.280.0040.01911.71
5.4.270.0050.01911.71
5.4.260.0040.01711.71
5.4.250.0040.01911.71
5.4.240.0050.01811.71
5.4.230.0060.01511.71
5.4.220.0060.01611.71
5.4.210.0040.01511.71
5.4.200.0040.01811.71
5.4.190.0030.01611.71
5.4.180.0030.01811.71
5.4.170.0050.01711.71
5.4.160.0060.01411.71
5.4.150.0060.01411.71
5.4.140.0050.01511.60
5.4.130.0070.01311.60
5.4.120.0030.01511.58
5.4.110.0040.01611.58
5.4.100.0040.02111.58
5.4.90.0040.01811.58
5.4.80.0060.01511.58
5.4.70.0070.01311.58
5.4.60.0040.01511.58
5.4.50.0030.02011.58
5.4.40.0070.01311.58
5.4.30.0040.01711.58
5.4.20.0040.01711.58
5.4.10.0060.01511.58
5.4.00.0030.01611.41
5.3.290.0060.03912.80
5.3.280.0080.03512.71
5.3.270.0050.04012.73
5.3.260.0030.04212.72
5.3.250.0060.03612.72
5.3.240.0050.04712.72
5.3.230.0070.04112.71
5.3.220.0070.03512.68
5.3.210.0090.04112.68
5.3.200.0080.03312.68
5.3.190.0080.04112.68
5.3.180.0090.03312.67
5.3.170.0030.04112.67
5.3.160.0060.03712.67
5.3.150.0070.03712.68
5.3.140.0070.04112.66
5.3.130.0060.04012.66
5.3.120.0100.04612.66
5.3.110.0120.03912.66
5.3.100.0070.04012.12
5.3.90.0050.03612.08
5.3.80.0050.03612.07
5.3.70.0060.04212.08
5.3.60.0040.04912.07
5.3.50.0070.03512.00
5.3.40.0070.03512.00
5.3.30.0090.03911.94
5.3.20.0090.03811.72
5.3.10.0040.04011.69
5.3.00.0070.03411.68
5.2.170.0070.0299.18
5.2.160.0050.0319.18
5.2.150.0080.0269.18
5.2.140.0040.0309.17
5.2.130.0020.0309.14
5.2.120.0070.0309.14
5.2.110.0020.0309.14
5.2.100.0060.0269.14
5.2.90.0080.0259.14
5.2.80.0020.0339.13
5.2.70.0060.0379.14
5.2.60.0060.0319.09
5.2.50.0070.0369.05
5.2.40.0060.0269.04
5.2.30.0040.0299.01
5.2.20.0060.0269.00
5.2.10.0070.0298.93
5.2.00.0020.0318.79
5.1.60.0040.0238.08
5.1.50.0050.0238.08
5.1.40.0030.0258.06
5.1.30.0040.0258.41
5.1.20.0060.0248.42
5.1.10.0040.0298.15
5.1.00.0060.0278.16
5.0.50.0040.0196.63
5.0.40.0020.0206.49
5.0.30.0040.0306.30
5.0.20.0040.0186.27
5.0.10.0030.0206.25
5.0.00.0020.0376.24
4.4.90.0030.0154.78
4.4.80.0040.0144.75
4.4.70.0020.0164.75
4.4.60.0010.0174.75
4.4.50.0030.0154.77
4.4.40.0020.0284.71
4.4.30.0020.0164.76
4.4.20.0050.0154.84
4.4.10.0030.0154.85
4.4.00.0020.0254.75
4.3.110.0010.0184.67
4.3.100.0020.0154.66
4.3.90.0010.0164.64
4.3.80.0040.0234.58
4.3.70.0020.0154.63
4.3.60.0030.0144.63
4.3.50.0030.0154.63
4.3.40.0020.0234.54
4.3.30.0000.0203.30
4.3.20.0020.0183.27
4.3.10.0030.0193.23
4.3.00.0100.01716.72

preferences:
38.07 ms | 401 KiB | 5 Q