3v4l.org

run code in 300+ PHP versions simultaneously
<?php // int isn't a reserved word, right? // So this should work fine! const test = 7; // Let's try using it! var_dump(test); /* Wait, what? A parse error? Why, you might ask? (int) is a special case in the lexer. Turns out that casts are lexed specially. Why? Probably to stop the type names being reserved words. That worked out spectacularly, didn't it. This has been around since at least PHP 3. */

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.70.0110.00716.58
8.3.60.0110.00418.30
8.3.50.0140.00321.98
8.3.40.0070.00718.73
8.3.30.0030.01018.84
8.3.20.0000.00720.27
8.3.10.0050.00323.65
8.3.00.0080.00020.96
8.2.180.0090.01318.41
8.2.170.0170.00022.96
8.2.160.0090.00620.53
8.2.150.0040.00724.18
8.2.140.0000.00724.66
8.2.130.0070.01026.16
8.2.120.0000.00820.89
8.2.110.0090.00019.25
8.2.100.0060.00617.66
8.2.90.0040.00418.09
8.2.80.0040.00417.97
8.2.70.0080.00017.38
8.2.60.0060.00317.91
8.2.50.0050.00518.07
8.2.40.0040.00419.75
8.2.30.0090.00018.11
8.2.20.0000.00817.60
8.2.10.0040.00417.96
8.2.00.0000.00817.66
8.1.280.0090.00625.92
8.1.270.0040.00421.97
8.1.260.0000.00726.35
8.1.250.0070.00028.09
8.1.240.0140.00321.91
8.1.230.0110.00020.89
8.1.220.0040.00417.74
8.1.210.0000.00818.89
8.1.200.0080.00017.23
8.1.190.0000.00817.10
8.1.180.0000.00818.10
8.1.170.0040.00418.56
8.1.160.0050.00222.00
8.1.150.0030.00718.49
8.1.140.0050.00217.37
8.1.130.0000.00717.71
8.1.120.0000.00717.38
8.1.110.0000.00717.43
8.1.100.0020.00517.35
8.1.90.0040.00417.23
8.1.80.0070.00017.34
8.1.70.0030.00317.33
8.1.60.0040.00417.50
8.1.50.0040.00417.40
8.1.40.0050.00317.34
8.1.30.0040.00417.61
8.1.20.0060.00317.46
8.1.10.0000.00717.27
8.1.00.0040.00417.29
8.0.300.0080.00019.91
8.0.290.0030.00616.75
8.0.280.0000.00718.41
8.0.270.0050.00317.22
8.0.260.0000.00717.18
8.0.250.0000.00616.79
8.0.240.0060.00016.89
8.0.230.0000.00716.75
8.0.220.0000.00716.70
8.0.210.0000.01016.86
8.0.200.0000.00616.87
8.0.190.0040.00416.91
8.0.180.0060.00516.88
8.0.170.0040.00416.79
8.0.160.0040.00416.75
8.0.150.0000.00716.74
8.0.140.0030.00316.81
8.0.130.0000.00513.17
8.0.120.0070.00016.71
8.0.110.0040.00416.81
8.0.100.0070.00016.84
8.0.90.0040.00416.70
8.0.80.0110.00416.80
8.0.70.0000.00716.64
8.0.60.0040.00416.78
8.0.50.0040.00416.82
8.0.30.0120.00716.86
8.0.20.0150.00417.40
8.0.10.0070.00016.97
8.0.00.0080.01016.72
7.4.330.0000.00615.00
7.4.320.0060.00016.44
7.4.300.0060.00016.52
7.4.290.0040.00416.45
7.4.280.0040.00416.42
7.4.270.0040.00416.53
7.4.260.0060.00316.55
7.4.250.0040.00416.47
7.4.240.0000.00716.52
7.4.230.0040.00416.36
7.4.220.0140.00316.59
7.4.210.0050.00916.39
7.4.200.0030.00316.27
7.4.160.0120.00316.44
7.4.150.0030.01417.40
7.4.140.0090.01217.86
7.4.130.0110.00916.46
7.4.120.0130.00716.50
7.4.110.0070.01016.31
7.4.100.0080.00816.40
7.4.90.0090.00916.29
7.4.80.0130.00319.39
7.4.70.0100.01216.28
7.4.60.0120.00316.32
7.4.50.0030.00616.10
7.4.40.0060.01016.39
7.4.30.0100.00616.42
7.4.00.0090.00614.90
7.3.330.0050.00012.93
7.3.320.0000.00612.92
7.3.310.0030.00316.06
7.3.300.0000.00616.17
7.3.290.0090.00616.24
7.3.280.0100.00716.20
7.3.270.0060.00917.40
7.3.260.0100.01016.13
7.3.250.0080.00916.18
7.3.240.0150.00616.22
7.3.230.0060.01216.43
7.3.210.0040.01416.32
7.3.200.0120.00619.39
7.3.190.0120.00916.36
7.3.180.0030.01316.20
7.3.170.0060.00916.27
7.3.160.0100.00616.58
7.3.120.0100.00514.71
7.3.110.0140.00314.50
7.3.100.0060.01214.75
7.3.90.0070.00714.84
7.3.80.0030.00814.93
7.3.70.0190.00014.87
7.3.60.0100.00314.66
7.3.50.0000.00914.68
7.3.40.0030.01014.52
7.3.30.0070.01014.76
7.3.20.0070.00316.49
7.3.10.0070.00416.87
7.3.00.0040.00816.34
7.2.330.0100.00716.51
7.2.320.0040.01416.66
7.2.310.0100.00716.56
7.2.300.0030.01316.37
7.2.290.0120.00616.36
7.2.250.0070.01014.91
7.2.240.0100.01014.94
7.2.230.0120.00314.73
7.2.220.0070.01114.93
7.2.210.0070.01414.98
7.2.200.0080.00815.09
7.2.190.0000.01715.05
7.2.180.0070.00715.09
7.2.170.0030.01314.88
7.2.80.0030.00916.72
7.2.00.0030.00719.31
7.1.330.0040.00715.73
7.1.320.0030.01215.73
7.1.310.0070.00815.84
7.1.300.0030.00915.41
7.1.290.0070.00715.71
7.1.280.0040.01115.92
7.1.270.0040.00415.40
7.1.260.0000.01715.79
7.1.200.0060.00915.69
7.1.100.0060.00618.05
7.1.70.0090.00916.91
7.1.60.0060.01619.70
7.1.50.0070.01716.64
7.1.00.0000.08022.45
7.0.200.0040.00416.63
7.0.140.0030.07322.11
7.0.60.0070.07719.94
7.0.50.0070.07317.87
7.0.40.0000.05720.23
7.0.30.0530.07020.22
7.0.20.0200.04020.13
7.0.10.0070.08720.16
7.0.00.0100.04020.21
5.6.280.0030.07320.92
5.6.210.0170.07020.71
5.6.200.0130.06318.21
5.6.190.0030.08720.44
5.6.180.3470.04320.63
5.6.170.0300.07720.49
5.6.160.0000.05320.51
5.6.150.0030.04018.18
5.6.140.0000.04718.13
5.6.130.0030.07018.16
5.6.120.0070.04321.09
5.6.110.0070.07320.96
5.6.100.0130.07721.10
5.6.90.0130.08020.87
5.6.80.0100.07320.38
5.6.70.4400.03320.36
5.5.350.0200.06320.43
5.5.340.0100.06317.98
5.5.330.0030.04320.26
5.5.320.0470.07020.48
5.5.310.0270.07720.21
5.5.300.0030.05317.89
5.5.290.0070.03717.98
5.5.280.0030.05020.84
5.5.270.0030.06320.96
5.5.260.0070.08720.86
5.5.250.0100.07020.46
5.5.240.0200.08320.22
5.4.450.0400.04329.93
5.4.440.0170.04729.93
5.4.430.0270.05328.86
5.4.420.0400.03728.29
5.4.410.0300.04328.29
5.4.400.0370.05728.29
5.4.390.0430.04028.29
5.4.380.0130.05718.56
5.4.370.0270.04718.59
5.4.360.0100.05718.65
5.4.350.0300.05718.48
5.4.340.0030.06318.57
5.4.320.0090.03212.45
5.4.310.0080.03512.45
5.4.300.0100.04712.45
5.4.290.0120.04212.45
5.4.280.0100.04912.35
5.4.270.0060.05012.35
5.4.260.0090.05112.34
5.4.250.0060.04112.35
5.4.240.0140.04612.34
5.4.230.0100.04512.34
5.4.220.0110.05112.34
5.4.210.0070.04712.34
5.4.200.0080.04012.34
5.4.190.0070.04712.34
5.4.180.0080.04212.33
5.4.170.0070.04712.34
5.4.160.0060.04912.34
5.4.150.0060.04312.34
5.4.140.0070.04912.02
5.4.130.0140.04112.01
5.4.120.0050.04911.96
5.4.110.0060.04611.96
5.4.100.0100.04611.96
5.4.90.0080.05011.97
5.4.80.0110.04911.96
5.4.70.0060.05111.96
5.4.60.0070.04611.96
5.4.50.0100.05011.96
5.4.40.0070.04111.95
5.4.30.0100.03211.95
5.4.20.0040.03811.95
5.4.10.0080.03311.95
5.4.00.0050.03611.43
5.3.290.0070.03912.80
5.3.280.0060.03912.70
5.3.270.0080.03812.72
5.3.260.0060.04012.72
5.3.250.0110.03412.72
5.3.240.0090.03712.72
5.3.230.0070.04112.71
5.3.220.0120.04512.68
5.3.210.0110.04012.68
5.3.200.0100.04812.68
5.3.190.0130.04912.68
5.3.180.0110.04912.67
5.3.170.0080.04912.67
5.3.160.0060.04312.68
5.3.150.0120.03912.67
5.3.140.0110.04212.66
5.3.130.0080.04112.66
5.3.120.0040.04712.66
5.3.110.0080.04612.66
5.3.100.0050.04212.12
5.3.90.0050.03812.08
5.3.80.0100.03312.07
5.3.70.0080.03612.07
5.3.60.0120.03112.06
5.3.50.0080.03812.00
5.3.40.0070.04212.00
5.3.30.0060.03611.94
5.3.20.0070.03711.72
5.3.10.0040.03611.69
5.3.00.0080.03611.68
5.2.170.0070.0309.18
5.2.160.0050.0299.18
5.2.150.0020.0339.18
5.2.140.0030.0339.18
5.2.130.0050.0289.14
5.2.120.0050.0309.14
5.2.110.0070.0279.14
5.2.100.0080.0259.14
5.2.90.0050.0299.14
5.2.80.0060.0299.14
5.2.70.0070.0389.14
5.2.60.0050.0319.09
5.2.50.0020.0339.06
5.2.40.0060.0289.04
5.2.30.0030.0339.02
5.2.20.0030.0309.00
5.2.10.0040.0298.92
5.2.00.0050.0308.79
5.1.60.0070.0218.07
5.1.50.0040.0258.06
5.1.40.0100.0278.04
5.1.30.0040.0288.40
5.1.20.0020.0298.42
5.1.10.0030.0278.14
5.1.00.0080.0238.14
5.0.50.0020.0226.62
5.0.40.0060.0166.47
5.0.30.0010.0346.29
5.0.20.0040.0196.27
5.0.10.0050.0186.24
5.0.00.0030.0326.23
4.4.90.0050.0154.78
4.4.80.0020.0164.76
4.4.70.0020.0174.75
4.4.60.0030.0174.76
4.4.50.0030.0174.77
4.4.40.0040.0254.71
4.4.30.0030.0164.76
4.4.20.0040.0194.84
4.4.10.0060.0134.85
4.4.00.0030.0264.76
4.3.110.0020.0174.67
4.3.100.0020.0164.66
4.3.90.0020.0164.63
4.3.80.0040.0244.58
4.3.70.0050.0124.63
4.3.60.0020.0164.63
4.3.50.0010.0184.63
4.3.40.0020.0264.54
4.3.30.0020.0163.28
4.3.20.0010.0183.26
4.3.10.0040.0143.22
4.3.00.0000.01728.29

preferences:
41.87 ms | 401 KiB | 5 Q