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! echo (int)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.60.0080.00816.73
8.3.50.0060.00921.84
8.3.40.0070.00718.73
8.3.30.0110.00419.02
8.3.20.0040.00420.07
8.3.10.0080.00023.52
8.3.00.0040.00420.78
8.2.180.0070.00718.04
8.2.170.0070.00722.96
8.2.160.0130.00720.30
8.2.150.0000.00824.18
8.2.140.0050.00324.66
8.2.130.0070.00026.16
8.2.120.0040.00420.67
8.2.110.0090.00022.07
8.2.100.0040.00720.21
8.2.90.0050.00518.87
8.2.80.0050.00317.97
8.2.70.0000.01017.63
8.2.60.0090.00017.68
8.2.50.0120.00018.07
8.2.40.0050.00217.84
8.2.30.0030.00618.05
8.2.20.0040.00417.61
8.2.10.0040.00417.98
8.2.00.0000.00817.66
8.1.280.0120.00625.92
8.1.270.0000.00822.09
8.1.260.0000.00726.35
8.1.250.0070.00028.09
8.1.240.0060.00322.05
8.1.230.0080.00418.97
8.1.220.0050.00217.74
8.1.210.0040.00418.77
8.1.200.0040.00417.10
8.1.190.0080.00017.23
8.1.180.0000.00818.10
8.1.170.0050.00318.55
8.1.160.0040.00421.95
8.1.150.0040.00418.48
8.1.140.0050.00317.29
8.1.130.0030.00317.81
8.1.120.0080.00017.39
8.1.110.0040.00417.38
8.1.100.0070.00017.26
8.1.90.0040.00417.28
8.1.80.0000.00717.38
8.1.70.0080.00017.34
8.1.60.0060.00317.52
8.1.50.0000.00717.32
8.1.40.0020.00517.45
8.1.30.0000.00917.40
8.1.20.0050.00217.48
8.1.10.0070.00017.30
8.1.00.0040.00417.33
8.0.300.0070.00018.77
8.0.290.0000.00816.63
8.0.280.0060.00018.22
8.0.270.0040.00417.18
8.0.260.0030.00317.13
8.0.250.0000.00616.77
8.0.240.0030.00616.94
8.0.230.0000.00716.77
8.0.220.0030.00316.70
8.0.210.0040.00416.79
8.0.200.0030.00516.87
8.0.190.0030.00516.74
8.0.180.0070.00016.82
8.0.170.0070.00016.85
8.0.160.0000.00716.85
8.0.150.0060.00616.68
8.0.140.0000.00716.77
8.0.130.0000.00513.20
8.0.120.0000.00816.80
8.0.110.0030.00516.83
8.0.100.0000.00716.70
8.0.90.0040.00416.63
8.0.80.0100.01016.76
8.0.70.0000.00716.69
8.0.60.0000.00716.72
8.0.50.0040.00416.67
8.0.30.0100.01016.85
8.0.20.0100.00717.40
8.0.10.0070.00016.91
8.0.00.0120.00616.64
7.4.330.0000.00515.03
7.4.320.0030.00316.43
7.4.300.0060.00016.43
7.4.290.0000.00716.43
7.4.280.0070.00016.42
7.4.270.0000.00716.46
7.4.260.0100.00016.55
7.4.250.0030.00616.37
7.4.240.0030.00316.49
7.4.230.0040.00416.63
7.4.220.0210.00316.37
7.4.210.0040.01416.37
7.4.200.0000.00716.30
7.4.160.0040.01116.27
7.4.150.0120.00617.40
7.4.140.0100.00717.86
7.4.130.0110.00716.31
7.4.120.0130.00716.45
7.4.110.0100.00716.44
7.4.100.0100.00716.38
7.4.90.0070.01016.54
7.4.80.0150.00619.39
7.4.70.0060.01616.31
7.4.60.0090.00616.23
7.4.50.0040.00416.30
7.4.40.0090.00616.48
7.4.30.0030.01216.46
7.4.00.0060.00914.66
7.3.330.0030.00313.12
7.3.320.0060.00012.89
7.3.310.0000.00716.25
7.3.300.0000.00716.14
7.3.290.0040.01116.24
7.3.280.0060.01516.20
7.3.270.0100.00717.40
7.3.260.0100.00716.30
7.3.250.0110.00816.32
7.3.240.0080.01116.44
7.3.230.0070.01016.39
7.3.210.0070.01416.46
7.3.200.0090.00919.39
7.3.190.0100.00716.51
7.3.180.0040.01116.27
7.3.170.0000.01616.44
7.3.160.0140.00616.30
7.3.120.0090.00914.78
7.3.110.0040.01414.76
7.3.100.0000.01414.59
7.3.90.0100.00014.47
7.3.80.0030.00614.39
7.3.70.0000.01814.72
7.3.60.0060.00614.68
7.3.50.0100.00314.71
7.3.40.0030.00914.84
7.3.30.0070.00714.47
7.3.20.0060.00616.53
7.3.10.0060.00516.63
7.3.00.0060.00816.71
7.2.330.0130.01016.44
7.2.320.0070.01016.71
7.2.310.0130.00316.57
7.2.300.0120.00516.32
7.2.290.0080.00916.74
7.2.250.0110.00714.95
7.2.240.0070.01015.16
7.2.230.0040.01114.84
7.2.220.0000.01514.98
7.2.210.0030.00715.00
7.2.200.0130.00314.77
7.2.190.0040.01415.05
7.2.180.0100.00614.54
7.2.170.0060.00814.86
7.2.130.0030.01316.77
7.2.120.0090.00616.77
7.2.110.0120.00316.76
7.2.100.0060.00916.97
7.2.90.0040.01117.05
7.2.80.0060.00617.00
7.2.70.0070.00716.92
7.2.60.0030.01016.93
7.2.50.0070.00716.98
7.2.40.0060.00316.89
7.2.30.0000.01416.86
7.2.20.0030.01016.86
7.2.10.0030.00616.48
7.2.00.0030.00817.95
7.1.330.0130.00015.55
7.1.320.0060.00315.66
7.1.310.0040.00415.55
7.1.300.0040.00815.48
7.1.290.0030.01015.46
7.1.280.0000.01115.62
7.1.270.0000.00915.58
7.1.260.0110.00315.66
7.1.250.0090.00315.87
7.1.100.0070.00417.93
7.1.70.0040.00417.20
7.1.60.0180.00719.70
7.1.50.0080.01516.61
7.1.00.0030.07722.31
7.0.200.0000.00716.68
7.0.140.0030.07322.10
7.0.60.0170.07319.96
7.0.50.0200.07317.85
7.0.40.0030.05020.07
7.0.30.0230.06720.17
7.0.20.0270.08020.13
7.0.10.0100.08020.20
7.0.00.0100.07720.32
5.6.280.0030.07320.77
5.6.210.0100.08020.74
5.6.200.0000.05318.09
5.6.190.0070.05320.53
5.6.180.1070.04720.37
5.6.170.0300.04020.41
5.6.160.0100.06720.38
5.6.150.0100.07718.26
5.6.140.0000.04318.18
5.6.130.0100.07318.14
5.6.120.0130.06320.99
5.6.110.0070.04021.00
5.6.100.0070.08721.04
5.6.90.0030.09021.12
5.6.80.0170.04320.50
5.6.70.4100.02720.39
5.5.350.0230.06720.37
5.5.340.0100.07717.91
5.5.330.0030.08020.28
5.5.320.0430.07020.30
5.5.310.0200.05020.29
5.5.300.0030.05318.00
5.5.290.0070.04717.98
5.5.280.0100.04020.96
5.5.270.0070.08020.85
5.5.260.0030.06720.95
5.5.250.0030.06720.54
5.5.240.0170.02720.23
5.4.450.0270.04329.93
5.4.440.0230.04029.93
5.4.430.0270.05729.09
5.4.420.0300.04728.29
5.4.410.0100.04328.29
5.4.400.0470.03028.29
5.4.390.0100.04728.29
5.4.380.0230.04318.49
5.4.370.0130.05318.50
5.4.360.0230.04718.62
5.4.350.0130.05718.70
5.4.340.0300.06318.45
5.4.320.0070.03812.46
5.4.310.0020.04212.45
5.4.300.0090.03312.45
5.4.290.0070.03812.45
5.4.280.0040.03712.34
5.4.270.0050.03712.35
5.4.260.0040.04912.34
5.4.250.0100.03612.34
5.4.240.0130.03512.34
5.4.230.0090.03812.34
5.4.220.0050.03912.34
5.4.210.0030.03812.34
5.4.200.0080.03812.34
5.4.190.0080.03712.33
5.4.180.0050.04712.34
5.4.170.0030.04312.34
5.4.160.0070.03712.34
5.4.150.0070.04612.34
5.4.140.0060.03612.02
5.4.130.0080.03312.01
5.4.120.0050.03711.96
5.4.110.0070.03511.96
5.4.100.0050.03711.96
5.4.90.0050.03911.96
5.4.80.0060.03711.96
5.4.70.0040.04411.96
5.4.60.0030.03811.96
5.4.50.0070.04011.96
5.4.40.0070.03511.95
5.4.30.0060.03611.95
5.4.20.0050.03811.95
5.4.10.0110.04111.95
5.4.00.0060.03711.43
5.3.290.0050.04512.80
5.3.280.0080.03812.71
5.3.270.0100.03712.73
5.3.260.0060.04412.72
5.3.250.0090.03812.72
5.3.240.0090.03912.71
5.3.230.0060.04112.71
5.3.220.0050.04012.68
5.3.210.0030.04212.68
5.3.200.0060.03612.68
5.3.190.0060.04812.68
5.3.180.0080.04412.67
5.3.170.0100.04312.67
5.3.160.0060.05312.67
5.3.150.0100.05312.67
5.3.140.0120.04512.66
5.3.130.0090.05212.66
5.3.120.0100.05212.66
5.3.110.0090.05212.66
5.3.100.0110.04512.12
5.3.90.0120.03712.09
5.3.80.0080.04212.07
5.3.70.0050.03912.07
5.3.60.0070.03812.06
5.3.50.0070.04012.00
5.3.40.0070.03912.00
5.3.30.0070.03711.94
5.3.20.0090.03911.71
5.3.10.0050.03811.68
5.3.00.0050.03711.68
5.2.170.0050.0319.18
5.2.160.0060.0309.18
5.2.150.0050.0339.18
5.2.140.0050.0319.17
5.2.130.0070.0329.13
5.2.120.0030.0389.14
5.2.110.0050.0329.15
5.2.100.0050.0309.14
5.2.90.0080.0359.14
5.2.80.0060.0379.14
5.2.70.0030.0369.14
5.2.60.0070.0409.09
5.2.50.0050.0349.06
5.2.40.0030.0329.03
5.2.30.0060.0329.02
5.2.20.0040.0349.00
5.2.10.0030.0338.92
5.2.00.0070.0318.79
5.1.60.0050.0288.07
5.1.50.0050.0278.06
5.1.40.0020.0298.05
5.1.30.0080.0288.40
5.1.20.0050.0388.42
5.1.10.0070.0268.14
5.1.00.0050.0288.14
5.0.50.0050.0216.63
5.0.40.0100.0206.48
5.0.30.0060.0296.29
5.0.20.0070.0176.27
5.0.10.0020.0226.23
5.0.00.0020.0356.23
4.4.90.0030.0174.78
4.4.80.0020.0184.75
4.4.70.0030.0154.75
4.4.60.0020.0184.76
4.4.50.0050.0144.77
4.4.40.0040.0244.71
4.4.30.0030.0164.76
4.4.20.0020.0164.84
4.4.10.0020.0164.85
4.4.00.0050.0234.76
4.3.110.0040.0144.67
4.3.100.0040.0154.66
4.3.90.0030.0154.63
4.3.80.0020.0274.59
4.3.70.0010.0174.63
4.3.60.0020.0154.63
4.3.50.0020.0184.63
4.3.40.0030.0244.54
4.3.30.0020.0173.28
4.3.20.0020.0173.26
4.3.10.0010.0173.22
4.3.00.0100.01728.29

preferences:
48.6 ms | 401 KiB | 5 Q