3v4l.org

run code in 300+ PHP versions simultaneously
<?php define('FOO', 10); $array = array(10 => FOO, "FOO" => 20); echo $array[FOO]; echo $array["FOO"]; print $array[$array[FOO]] * $array["FOO"]; ?>

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)
8.3.60.0120.00316.50
8.3.50.0180.00320.09
8.3.40.0070.00718.70
8.3.30.0100.00318.94
8.3.20.0070.00020.35
8.3.10.0040.00423.36
8.3.00.0040.00419.26
8.2.180.0030.01118.28
8.2.170.0140.00422.96
8.2.160.0110.00420.52
8.2.150.0040.00424.18
8.2.140.0000.00824.66
8.2.130.0060.00926.16
8.2.120.0040.00421.16
8.2.110.0060.00320.52
8.2.100.0120.00017.91
8.2.90.0030.00519.27
8.2.80.0000.00817.97
8.2.70.0080.00017.50
8.2.60.0090.00318.04
8.2.50.0110.00518.07
8.2.40.0050.00218.16
8.2.30.0070.00018.04
8.2.20.0000.00817.78
8.2.10.0000.00818.17
8.2.00.0040.00417.77
8.1.280.0100.01025.92
8.1.270.0090.00023.68
8.1.260.0040.00426.35
8.1.250.0070.00028.09
8.1.240.0030.00622.14
8.1.230.0040.00723.98
8.1.220.0080.00017.78
8.1.210.0040.00418.77
8.1.200.0040.00717.35
8.1.190.0000.01017.35
8.1.180.0060.00318.10
8.1.170.0000.00918.63
8.1.160.0000.00721.96
8.1.150.0040.00418.93
8.1.140.0000.00717.55
8.1.130.0030.00317.76
8.1.120.0040.00417.51
8.1.110.0070.00017.35
8.1.100.0070.00017.49
8.1.90.0000.00717.43
8.1.80.0040.00417.40
8.1.70.0030.00317.32
8.1.60.0030.00617.46
8.1.50.0060.00317.54
8.1.40.0070.00017.51
8.1.30.0090.00017.51
8.1.20.0000.00717.54
8.1.10.0000.00817.45
8.1.00.0050.00317.39
8.0.300.0040.00418.77
8.0.290.0000.00716.75
8.0.280.0030.00318.47
8.0.270.0070.00017.25
8.0.260.0030.00317.19
8.0.250.0070.00016.83
8.0.240.0070.00017.02
8.0.230.0000.00716.97
8.0.220.0000.00716.87
8.0.210.0000.00716.84
8.0.200.0000.00716.97
8.0.190.0040.00416.96
8.0.180.0040.00516.86
8.0.170.0000.00916.93
8.0.160.0000.00716.83
8.0.150.0000.00716.71
8.0.140.0050.00216.86
8.0.130.0030.00413.34
8.0.120.0000.00816.84
8.0.110.0080.00016.81
8.0.100.0000.00716.75
8.0.90.0000.00716.76
8.0.80.0030.01316.90
8.0.70.0040.00416.66
8.0.60.0000.00716.75
8.0.50.0050.00316.67
8.0.30.0160.00517.09
8.0.20.0140.00917.40
8.0.10.0040.00417.09
8.0.00.0130.00416.99
7.4.330.0000.00515.13
7.4.320.0030.00316.60
7.4.300.0060.00016.50
7.4.290.0070.00016.64
7.4.280.0040.00416.45
7.4.270.0000.00616.47
7.4.260.0000.00916.58
7.4.250.0070.00016.51
7.4.240.0040.00416.61
7.4.230.0000.00716.60
7.4.220.0070.01016.63
7.4.210.0030.01716.54
7.4.200.0030.00316.36
7.4.160.0170.00616.63
7.4.150.0170.00717.40
7.4.140.0080.01017.86
7.4.130.0110.00816.59
7.4.120.0080.00916.30
7.4.110.0090.00616.68
7.4.100.0170.00016.37
7.4.90.0070.01016.46
7.4.80.0060.01019.39
7.4.70.0120.01216.42
7.4.60.0030.01216.36
7.4.50.0050.00316.41
7.4.40.0080.00816.62
7.4.30.0120.00416.30
7.4.00.0120.00314.81
7.3.330.0000.00613.14
7.3.320.0030.00313.25
7.3.310.0000.00716.22
7.3.300.0000.00816.12
7.3.290.0070.01016.19
7.3.280.0060.01016.22
7.3.270.0040.01417.40
7.3.260.0030.01816.45
7.3.250.0100.00616.35
7.3.240.0100.00716.48
7.3.230.0140.00316.48
7.3.210.0100.00716.40
7.3.200.0130.00319.39
7.3.190.0090.00616.45
7.3.180.0060.01016.46
7.3.170.0030.01316.46
7.3.160.0120.00316.49
7.3.120.0150.00014.51
7.3.110.0040.00814.78
7.3.100.0090.00614.85
7.3.90.0080.00814.82
7.3.80.0040.01214.54
7.3.70.0040.01114.88
7.3.60.0080.00814.85
7.3.50.0060.00614.71
7.3.40.0040.01414.95
7.3.30.0060.00314.54
7.3.20.0090.00316.64
7.3.10.0030.01316.68
7.3.00.0030.01016.68
7.2.330.0130.00316.38
7.2.320.0080.00816.66
7.2.310.0110.00716.43
7.2.300.0090.00616.39
7.2.290.0060.00916.71
7.2.240.0000.01615.10
7.2.230.0070.00415.21
7.2.220.0060.01014.98
7.2.210.0110.00314.96
7.2.200.0140.00314.96
7.2.190.0090.00915.18
7.2.180.0070.01114.77
7.2.170.0040.01114.83
7.2.160.0030.01014.96
7.2.150.0030.01016.77
7.2.140.0090.00616.84
7.2.130.0040.00816.72
7.2.120.0040.00816.62
7.2.110.0130.01016.61
7.2.100.0000.01716.82
7.2.90.0070.00716.68
7.2.80.0000.01416.58
7.2.70.0100.00716.96
7.2.60.0040.01216.86
7.2.50.0110.00316.73
7.2.40.0120.00316.93
7.2.30.0070.01016.65
7.2.20.0040.00816.80
7.2.10.0100.00317.03
7.2.00.0090.00718.03
7.1.330.0000.01715.46
7.1.320.0060.00915.76
7.1.310.0070.00715.82
7.1.300.0030.01015.98
7.1.290.0080.00415.73
7.1.280.0060.01015.69
7.1.270.0100.00315.54
7.1.260.0060.00615.81
7.1.250.0150.00015.59
7.1.200.0040.00815.75
7.1.100.0040.00818.13
7.1.70.0070.00717.17
7.1.60.0070.01819.46
7.1.50.0060.00616.98
7.1.00.0000.08022.43
7.0.200.0050.00216.73
7.0.140.0030.07022.11
7.0.60.0100.07320.02
7.0.50.0100.06717.77
7.0.40.0100.06020.36
7.0.30.0200.07020.09
7.0.20.0200.04720.25
7.0.10.0100.08320.20
7.0.00.0030.08020.04
5.6.280.0070.07021.12
5.6.210.0100.05720.50
5.6.200.0130.08018.16
5.6.190.0070.04020.45
5.6.180.0230.08020.39
5.6.170.0200.06020.45
5.6.160.0100.07720.37
5.6.150.0100.05018.11
5.6.140.0030.09018.08
5.6.130.0030.08718.11
5.6.120.0100.03721.09
5.6.110.0070.06021.01
5.6.100.0130.07321.10
5.6.90.0100.08020.97
5.6.80.0130.05320.42
5.6.70.4500.04020.51
5.5.350.0100.04020.47
5.5.340.0070.08317.89
5.5.330.0100.09020.14
5.5.320.0070.08320.24
5.5.310.0030.05320.21
5.5.300.0130.03718.02
5.5.290.0100.07317.88
5.5.280.0100.04720.98
5.5.270.0070.08720.86
5.5.260.0130.03320.76
5.5.250.0030.04020.54
5.5.240.0200.08020.26
5.4.450.0300.05019.57
5.4.440.0200.04019.41
5.4.430.0200.04319.13
5.4.420.0170.03719.13
5.4.410.0400.04019.26
5.4.400.0230.03719.22
5.4.390.0470.04719.16
5.4.380.0430.04318.51
5.4.370.0330.05318.48
5.4.360.0370.04718.62
5.4.350.0370.05318.49
5.4.340.0330.05718.55
5.4.320.0050.03612.45
5.4.310.0070.03612.45
5.4.300.0070.03812.46
5.4.290.0060.03712.45
5.4.280.0030.03912.35
5.4.270.0080.03412.35
5.4.260.0020.04012.35
5.4.250.0060.03812.35
5.4.240.0060.03412.35
5.4.230.0060.03612.34
5.4.220.0040.03712.34
5.4.210.0060.03512.34
5.4.200.0030.03912.34
5.4.190.0070.03412.34
5.4.180.0030.03812.34
5.4.170.0040.03712.35
5.4.160.0040.03712.34
5.4.150.0030.03612.34
5.4.140.0020.04012.03
5.4.130.0090.03212.01
5.4.120.0070.03511.97
5.4.110.0080.03411.96
5.4.100.0040.03811.97
5.4.90.0030.03911.97
5.4.80.0060.03811.97
5.4.70.0020.04311.96
5.4.60.0080.04011.96
5.4.50.0030.03811.96
5.4.40.0040.03511.95
5.4.30.0050.03511.95
5.4.20.0070.03311.95
5.4.10.0020.03711.95
5.4.00.0050.03511.44
5.3.290.0050.03912.80
5.3.280.0030.03912.71
5.3.270.0050.03912.72
5.3.260.0070.03712.71
5.3.250.0060.03712.72
5.3.240.0030.04012.72
5.3.230.0070.03612.71
5.3.220.0040.03812.68
5.3.210.0060.03812.68
5.3.200.0040.03812.68
5.3.190.0060.03712.68
5.3.180.0060.03612.68
5.3.170.0050.03712.66
5.3.160.0030.03812.68
5.3.150.0080.03412.67
5.3.140.0050.03612.66
5.3.130.0060.03812.65
5.3.120.0050.03912.66
5.3.110.0050.04512.66
5.3.100.0050.03712.12
5.3.90.0060.03412.08
5.3.80.0070.03512.08
5.3.70.0070.03412.07
5.3.60.0080.03512.06
5.3.50.0060.04012.00
5.3.40.0070.03412.00
5.3.30.0060.03411.94
5.3.20.0080.03111.72
5.3.10.0040.03611.69
5.3.00.0050.03711.68
5.2.170.0030.0319.18
5.2.160.0070.0279.18
5.2.150.0080.0269.18
5.2.140.0040.0309.17
5.2.130.0080.0289.13
5.2.120.0090.0279.13
5.2.110.0050.0289.14
5.2.100.0040.0309.14
5.2.90.0050.0289.14
5.2.80.0050.0309.13
5.2.70.0010.0349.13
5.2.60.0040.0309.09
5.2.50.0110.0279.05
5.2.40.0040.0299.04
5.2.30.0060.0279.01
5.2.20.0030.0309.00
5.2.10.0030.0298.95
5.2.00.0050.0288.79
5.1.60.0060.0228.07
5.1.50.0050.0248.07
5.1.40.0050.0238.06
5.1.30.0070.0238.41
5.1.20.0040.0258.43
5.1.10.0050.0248.15
5.1.00.0050.0318.15
5.0.50.0100.0266.63
5.0.40.0030.0216.49
5.0.30.0040.0336.30
5.0.20.0040.0176.27
5.0.10.0030.0206.25
5.0.00.0030.0316.24
4.4.90.0020.0164.78
4.4.80.0020.0154.75
4.4.70.0050.0194.76
4.4.60.0030.0144.75
4.4.50.0030.0144.77
4.4.40.0020.0254.71
4.4.30.0020.0154.76
4.4.20.0010.0184.84
4.4.10.0030.0154.85
4.4.00.0020.0254.76
4.3.110.0030.0144.67
4.3.100.0010.0164.66
4.3.90.0030.0144.63
4.3.80.0030.0234.59
4.3.70.0030.0144.63
4.3.60.0030.0144.63
4.3.50.0020.0164.63
4.3.40.0030.0234.54
4.3.30.0000.0183.29
4.3.20.0020.0163.27
4.3.10.0010.0163.23
4.3.00.0070.01718.23

preferences:
53.88 ms | 400 KiB | 5 Q