3v4l.org

run code in 300+ PHP versions simultaneously
<?php // int isn't a reserved word, right? // So this should work fine! const int = 7; // Let's try using it! var_dump('' . int); /* 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.01118.43
8.3.60.0130.00616.50
8.3.50.0090.00921.92
8.3.40.0150.00018.54
8.3.30.0000.01419.17
8.3.20.0040.00420.16
8.3.10.0040.00423.65
8.3.00.0080.00020.77
8.2.180.0090.00616.63
8.2.170.0040.01822.96
8.2.160.0090.00620.43
8.2.150.0040.00424.18
8.2.140.0070.00024.66
8.2.130.0080.00026.16
8.2.120.0040.00420.86
8.2.110.0090.00022.13
8.2.100.0030.00720.52
8.2.90.0000.00719.11
8.2.80.0000.00817.97
8.2.70.0000.00917.50
8.2.60.0000.00917.80
8.2.50.0040.00818.07
8.2.40.0040.00418.16
8.2.30.0060.00318.25
8.2.20.0000.00717.50
8.2.10.0000.00718.00
8.2.00.0020.00517.72
8.1.280.0120.00925.92
8.1.270.0060.00323.97
8.1.260.0000.00726.35
8.1.250.0000.00728.09
8.1.240.0100.00021.98
8.1.230.0080.00319.09
8.1.220.0030.00617.74
8.1.210.0040.00418.77
8.1.200.0090.00017.13
8.1.190.0040.00417.00
8.1.180.0050.00318.10
8.1.170.0040.00418.49
8.1.160.0000.00722.07
8.1.150.0000.00718.57
8.1.140.0040.00417.40
8.1.130.0030.00317.76
8.1.120.0030.00517.31
8.1.110.0050.00217.39
8.1.100.0000.00817.46
8.1.90.0020.00517.43
8.1.80.0080.00017.43
8.1.70.0070.00017.36
8.1.60.0000.00817.56
8.1.50.0000.00817.46
8.1.40.0000.00717.46
8.1.30.0080.00017.48
8.1.20.0000.00817.61
8.1.10.0080.00017.38
8.1.00.0040.00417.36
8.0.300.0000.00718.77
8.0.290.0040.00416.63
8.0.280.0000.00718.39
8.0.270.0000.00817.16
8.0.260.0000.00617.05
8.0.250.0000.00616.79
8.0.240.0000.00716.88
8.0.230.0050.00216.88
8.0.220.0030.00316.85
8.0.210.0030.00316.72
8.0.200.0000.00616.87
8.0.190.0040.00416.85
8.0.180.0040.00416.76
8.0.170.0080.00016.78
8.0.160.0000.00716.67
8.0.150.0000.00816.88
8.0.140.0040.00416.70
8.0.130.0000.00613.28
8.0.120.0040.00416.80
8.0.110.0070.00016.65
8.0.100.0040.00416.72
8.0.90.0070.00016.67
8.0.80.0090.01016.78
8.0.70.0050.00216.85
8.0.60.0000.00716.91
8.0.50.0000.00816.78
8.0.30.0150.00617.13
8.0.20.0120.00617.40
8.0.10.0040.00416.97
8.0.00.0040.01216.81
7.4.330.0000.00515.02
7.4.320.0000.00616.54
7.4.300.0030.00316.36
7.4.290.0000.00716.43
7.4.280.0000.00816.44
7.4.270.0000.00716.50
7.4.260.0090.00016.57
7.4.250.0070.00016.32
7.4.240.0010.00616.49
7.4.230.0030.00316.61
7.4.220.0070.01016.49
7.4.210.0070.00716.30
7.4.200.0030.00316.36
7.4.160.0110.00416.41
7.4.150.0140.00717.40
7.4.140.0170.00017.86
7.4.130.0100.00716.43
7.4.120.0100.00916.43
7.4.110.0130.01016.61
7.4.100.0040.01816.55
7.4.90.0080.01116.41
7.4.80.0090.01319.39
7.4.70.0030.01316.44
7.4.60.0100.01016.41
7.4.50.0060.00316.25
7.4.40.0040.01216.61
7.4.30.0120.00316.27
7.4.00.0040.01414.91
7.3.330.0050.00013.09
7.3.320.0000.00712.93
7.3.310.0030.00316.33
7.3.300.0000.00716.19
7.3.290.0140.00716.13
7.3.280.0090.00916.23
7.3.270.0030.01417.40
7.3.260.0100.00716.37
7.3.250.0100.00716.43
7.3.240.0160.00616.58
7.3.230.0060.01316.39
7.3.210.0120.00616.12
7.3.200.0070.01116.32
7.3.190.0130.00716.47
7.3.180.0090.00616.43
7.3.170.0060.00916.27
7.3.160.0060.00916.48
7.3.120.0140.00014.50
7.3.10.0020.01216.55
7.3.00.0040.01216.62
7.2.330.0030.01416.53
7.2.320.0100.00716.44
7.2.310.0120.00416.50
7.2.300.0040.01216.53
7.2.290.0110.00516.70
7.2.130.0040.01216.82
7.2.120.0040.00916.71
7.2.110.0050.01016.78
7.2.100.0050.00916.92
7.2.90.0080.00816.85
7.2.80.0020.01116.97
7.2.70.0030.00916.95
7.2.60.0070.00516.70
7.2.50.0110.00516.92
7.2.40.0100.00516.83
7.2.30.0040.00916.91
7.2.20.0080.00516.85
7.2.10.0060.00416.77
7.2.00.0040.00817.65
7.1.250.0030.01215.67
7.1.100.0040.00417.81
7.1.70.0090.00317.21
7.1.60.0110.01419.70
7.1.50.0290.00634.74
7.1.00.0100.07022.34
7.0.200.0060.00316.81
7.0.140.0000.07722.21
7.0.60.0030.04019.88
7.0.50.0030.06017.66
7.0.40.0070.08020.05
7.0.30.0300.08020.00
7.0.20.0470.06320.09
7.0.10.0100.08020.21
7.0.00.0030.08020.16
5.6.210.0030.08720.50
5.6.200.0100.08018.21
5.6.190.0070.04320.27
5.6.180.4000.04720.48
5.6.170.0270.08020.48
5.6.160.0070.03720.47
5.6.150.0070.08318.18
5.6.140.0100.07018.12
5.6.130.0170.06718.15
5.6.120.0070.06021.01
5.6.110.0030.04721.00
5.6.100.0130.07321.00
5.6.90.0170.07720.95
5.6.80.0070.06020.50
5.6.70.3030.03320.42
5.5.350.0230.07720.34
5.5.340.0070.08017.96
5.5.330.0030.04020.14
5.5.320.3930.02720.23
5.5.310.0230.08020.17
5.5.300.0000.04718.02
5.5.290.0130.03317.87
5.5.280.0130.07720.76
5.5.270.0030.04320.96
5.5.260.0130.08320.61
5.5.250.0230.07020.57
5.5.240.0170.08020.22
5.4.450.0370.04029.93
5.4.440.0470.04329.93
5.4.430.0570.04029.92
5.4.420.0130.04329.48
5.4.410.0470.04328.29
5.4.400.0400.03728.29
5.4.390.0270.04028.29
5.4.380.0200.06718.72
5.4.370.0230.04718.59
5.4.360.0230.04318.51
5.4.350.0100.06018.70
5.4.340.0200.07018.51
5.4.320.0050.03612.45
5.4.310.0050.04912.45
5.4.300.0150.04212.45
5.4.290.0090.05012.45
5.4.280.0160.04112.35
5.4.270.0060.05212.35
5.4.260.0110.05212.34
5.4.250.0110.05312.34
5.4.240.0090.05112.34
5.4.230.0220.07312.34
5.4.220.0060.05512.34
5.4.210.0130.05212.34
5.4.200.0120.05012.34
5.4.190.0110.05012.34
5.4.180.0130.04812.33
5.4.170.0080.05312.34
5.4.160.0160.04112.34
5.4.150.0130.04612.34
5.4.140.0170.04312.02
5.4.130.0090.04812.01
5.4.120.0100.05711.96
5.4.110.0100.04911.96
5.4.100.0090.04711.96
5.4.90.0160.04511.96
5.4.80.0060.05211.96
5.4.70.0070.05011.96
5.4.60.0060.05111.96
5.4.50.0090.04911.96
5.4.40.0140.04311.95
5.4.30.0090.04811.95
5.4.20.0050.05711.95
5.4.10.0040.05311.94
5.4.00.0060.05311.43
5.3.290.0080.03712.80
5.3.280.0080.05212.71
5.3.270.0050.05712.72
5.3.260.0060.05912.72
5.3.250.0080.04412.72
5.3.240.0110.04312.72
5.3.230.0100.05112.71
5.3.220.0110.05412.68
5.3.210.0110.05412.68
5.3.200.0070.04012.68
5.3.190.0090.06512.68
5.3.180.0120.05012.67
5.3.170.0130.05212.67
5.3.160.0130.04412.67
5.3.150.0050.05512.67
5.3.140.0080.05512.66
5.3.130.0100.05412.66
5.3.120.0120.05112.65
5.3.110.0070.06012.66
5.3.100.0090.05512.12
5.3.90.0120.05412.08
5.3.80.0080.05312.07
5.3.70.0140.04912.07
5.3.60.0070.05012.06
5.3.50.0060.05012.00
5.3.40.0080.04812.00
5.3.30.0120.04611.94
5.3.20.0090.04911.71
5.3.10.0120.04611.69
5.3.00.0070.05211.68
5.2.170.0080.0419.18
5.2.160.0060.0429.18
5.2.150.0080.0469.18
5.2.140.0050.0439.18
5.2.130.0080.0399.14
5.2.120.0060.0419.14
5.2.110.0050.0409.14
5.2.100.0060.0409.14
5.2.90.0080.0399.14
5.2.80.0080.0399.14
5.2.70.0060.0409.14
5.2.60.0110.0349.09
5.2.50.0070.0399.05
5.2.40.0060.0369.03
5.2.30.0070.0389.02
5.2.20.0100.0399.01
5.2.10.0070.0408.93
5.2.00.0080.0378.79
5.1.60.0080.0318.07
5.1.50.0050.0348.06
5.1.40.0060.0348.04
5.1.30.0070.0358.39
5.1.20.0070.0368.42
5.1.10.0080.0338.14
5.1.00.0040.0298.14
5.0.50.0030.0226.62
5.0.40.0020.0226.48
5.0.30.0040.0376.29
5.0.20.0030.0246.27
5.0.10.0060.0246.23
5.0.00.0080.0346.23
4.4.90.0030.0194.78
4.4.80.0030.0214.75
4.4.70.0050.0194.76
4.4.60.0060.0184.76
4.4.50.0050.0194.77
4.4.40.0040.0314.70
4.4.30.0050.0324.76
4.4.20.0120.0344.84
4.4.10.0030.0284.85
4.4.00.0020.0624.75
4.3.110.0120.0384.67
4.3.100.0050.0224.67
4.3.90.0130.0184.63
4.3.80.0030.0354.58
4.3.70.0040.0234.63
4.3.60.0030.0254.63
4.3.50.0070.0224.63
4.3.40.0070.0324.54
4.3.30.0020.0233.28
4.3.20.0080.0523.26
4.3.10.0120.0373.22
4.3.00.0130.01728.29

preferences:
58.25 ms | 401 KiB | 5 Q