3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = array('a','b','c','d'); $pos = rand(0,count($array)); echo $array[$pos];

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.00.0040.01414.98
7.3.120.0030.01314.87
7.3.110.0040.01514.80
7.3.100.0040.00415.01
7.3.90.0130.00014.42
7.3.80.0090.00614.96
7.3.70.0060.00914.90
7.3.60.0060.00914.79
7.3.50.0060.00614.63
7.3.40.0030.01014.77
7.3.30.0080.00414.61
7.3.20.0060.00316.73
7.3.10.0080.00616.72
7.3.00.0060.01016.43
7.2.250.0030.01714.84
7.2.240.0130.00714.84
7.2.230.0100.00714.75
7.2.220.0080.00314.88
7.2.210.0000.01315.22
7.2.200.0100.01015.07
7.2.190.0000.01115.18
7.2.180.0040.01114.96
7.2.170.0090.00315.26
7.2.00.0000.01519.64
7.1.330.0030.01015.85
7.1.320.0090.00615.89
7.1.310.0000.00915.69
7.1.300.0090.00015.52
7.1.290.0110.00415.46
7.1.280.0030.00815.81
7.1.270.0030.00515.46
7.1.260.0030.01015.84
7.1.70.0040.00817.27
7.1.60.0030.02119.40
7.1.50.0070.01716.48
7.1.00.0070.07322.46
7.0.200.0030.00716.36
7.0.140.0000.07722.08
7.0.60.0100.08019.90
7.0.50.0100.08017.87
7.0.40.0130.03719.98
7.0.30.0230.06020.20
7.0.20.0330.07320.16
7.0.10.0170.07320.00
7.0.00.0030.04720.18
5.6.280.0030.07321.12
5.6.210.0100.08020.47
5.6.200.0030.04318.16
5.6.190.0130.08320.43
5.6.180.0270.04720.64
5.6.170.0130.04720.48
5.6.160.0070.03720.37
5.6.150.0070.08318.19
5.6.140.0030.03718.21
5.6.130.0200.06718.12
5.6.120.0030.08721.01
5.6.110.0070.07321.13
5.6.100.0030.04021.01
5.6.90.0070.08320.99
5.6.80.0170.07320.39
5.5.350.0130.04720.29
5.5.340.0030.08318.00
5.5.330.0030.08720.23
5.5.320.0200.04720.34
5.5.310.0300.07320.21
5.5.300.0000.04317.96
5.5.290.0070.03718.01
5.5.280.0130.07720.89
5.5.270.0170.07720.75
5.5.260.0000.07320.83
5.5.250.0000.05020.58
5.5.240.0300.06320.03
5.4.450.0200.04019.41
5.4.440.0300.03319.46
5.4.430.0300.04719.21
5.4.420.0330.04319.38
5.4.410.0230.04019.35
5.4.400.0270.03718.92
5.4.390.0100.04319.09
5.4.380.0470.04718.57
5.4.370.0370.07018.46
5.4.360.0230.06318.68
5.4.350.0330.05718.74
5.4.340.0230.06318.72
5.4.320.0100.03312.45
5.4.310.0080.03612.45
5.4.300.0070.03512.45
5.4.290.0030.04112.45
5.4.280.0060.04012.35
5.4.270.0030.04512.34
5.4.260.0040.04512.34
5.4.250.0090.04212.34
5.4.240.0050.03712.35
5.4.230.0090.04212.34
5.4.220.0110.03412.34
5.4.210.0060.03612.34
5.4.200.0040.03912.34
5.4.190.0060.03612.33
5.4.180.0040.03712.34
5.4.170.0070.03512.35
5.4.160.0090.03212.34
5.4.150.0080.03312.34
5.4.140.0080.03412.02
5.4.130.0040.03712.01
5.4.120.0080.03311.97
5.4.110.0040.03711.96
5.4.100.0040.04211.96
5.4.90.0040.03911.96
5.4.80.0080.03411.96
5.4.70.0060.03411.96
5.4.60.0060.03411.96
5.4.50.0060.03411.96
5.4.40.0040.03511.95
5.4.30.0050.03611.95
5.4.20.0060.03411.95
5.4.10.0060.03411.95
5.4.00.0040.04211.44
5.3.290.0060.03912.80
5.3.280.0050.04112.71
5.3.270.0080.04012.72
5.3.260.0070.04112.72
5.3.250.0080.04312.71
5.3.240.0040.04012.72
5.3.230.0040.04012.71
5.3.220.0090.03412.68
5.3.210.0050.03912.68
5.3.200.0070.03512.68
5.3.190.0050.04012.68
5.3.180.0080.03512.68
5.3.170.0040.03712.66
5.3.160.0050.03712.67
5.3.150.0080.03512.67
5.3.140.0070.03712.66
5.3.130.0050.04012.66
5.3.120.0050.04112.66
5.3.110.0070.03712.66
5.3.100.0040.03712.12
5.3.90.0070.03412.08
5.3.80.0070.04412.08
5.3.70.0100.03812.07
5.3.60.0090.03612.07
5.3.50.0110.04811.99
5.3.40.0060.04212.00
5.3.30.0090.04711.95
5.3.20.0060.04311.72
5.3.10.0050.05311.70
5.3.00.0080.04111.68
5.2.170.0030.0329.18
5.2.160.0060.0279.18
5.2.150.0070.0279.18
5.2.140.0050.0299.18
5.2.130.0050.0289.14
5.2.120.0020.0309.14
5.2.110.0040.0289.14
5.2.100.0060.0279.14
5.2.90.0070.0369.14
5.2.80.0070.0279.14
5.2.70.0040.0299.14
5.2.60.0040.0299.09
5.2.50.0060.0339.06
5.2.40.0040.0299.03
5.2.30.0040.0349.01
5.2.20.0040.0308.99
5.2.10.0040.0298.91
5.2.00.0030.0318.77
5.1.60.0070.0238.06
5.1.50.0060.0278.05
5.1.40.0060.0228.04
5.1.30.0050.0248.39
5.1.20.0070.0228.41
5.1.10.0040.0258.14
5.1.00.0040.0278.13
5.0.50.0050.0256.61
5.0.40.0060.0186.47
5.0.30.0030.0316.29
5.0.20.0020.0256.25
5.0.10.0030.0206.23
5.0.00.0040.0376.23
4.4.90.0020.0214.78
4.4.80.0040.0134.75
4.4.70.0020.0164.75
4.4.60.0030.0184.75
4.4.50.0030.0154.77
4.4.40.0030.0244.71
4.4.30.0050.0164.75
4.4.20.0040.0214.84
4.4.10.0030.0154.85
4.4.00.0020.0314.76
4.3.110.0000.0194.67
4.3.100.0020.0154.66
4.3.90.0030.0134.63
4.3.80.0030.0244.58
4.3.70.0030.0174.63
4.3.60.0020.0154.63
4.3.50.0010.0204.62
4.3.40.0010.0264.54
4.3.30.0020.0163.28
4.3.20.0040.0223.26
4.3.10.0030.0203.21
4.3.00.0000.02015.97

preferences:
41.48 ms | 401 KiB | 5 Q