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! $a = int; var_dump($a); /* 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.0110.01118.43
8.3.50.0230.00421.87
8.3.40.0060.00918.73
8.3.30.0120.00318.93
8.3.20.0070.00020.21
8.3.10.0080.00023.48
8.3.00.0000.00821.02
8.2.180.0110.00416.32
8.2.170.0090.00922.96
8.2.160.0110.00720.52
8.2.150.0080.00024.18
8.2.140.0040.00424.66
8.2.130.0070.00026.16
8.2.120.0040.00419.64
8.2.110.0030.00622.08
8.2.100.0040.00817.84
8.2.90.0000.00817.72
8.2.80.0030.00617.97
8.2.70.0030.00617.50
8.2.60.0050.00318.04
8.2.50.0080.00018.07
8.2.40.0000.00821.02
8.2.30.0000.00918.23
8.2.20.0080.00017.66
8.2.10.0040.00417.92
8.2.00.0050.00217.66
8.1.280.0100.00725.92
8.1.270.0000.00823.78
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0070.00322.42
8.1.230.0070.00421.03
8.1.220.0060.00317.79
8.1.210.0040.00418.88
8.1.200.0060.00317.35
8.1.190.0040.00417.13
8.1.180.0030.00618.10
8.1.170.0080.00018.50
8.1.160.0000.00721.94
8.1.150.0040.00418.58
8.1.140.0000.00717.43
8.1.130.0030.00317.82
8.1.120.0040.00417.45
8.1.110.0020.00517.45
8.1.100.0040.00417.36
8.1.90.0030.00317.46
8.1.80.0000.00717.35
8.1.70.0000.00717.36
8.1.60.0040.00717.61
8.1.50.0030.00617.44
8.1.40.0060.00317.40
8.1.30.0050.00317.61
8.1.20.0040.00417.70
8.1.10.0000.00817.45
8.1.00.0030.00717.41
8.0.300.0040.00419.90
8.0.290.0040.00417.05
8.0.280.0030.00318.43
8.0.270.0000.00717.16
8.0.260.0000.00717.21
8.0.250.0030.00316.91
8.0.240.0030.00316.90
8.0.230.0000.00716.92
8.0.220.0000.00716.90
8.0.210.0030.00516.88
8.0.200.0000.00716.87
8.0.190.0000.00817.04
8.0.180.0050.00316.95
8.0.170.0060.00316.79
8.0.160.0040.00416.93
8.0.150.0000.00716.91
8.0.140.0000.00716.75
8.0.130.0050.00013.34
8.0.120.0040.00416.88
8.0.110.0070.00016.85
8.0.100.0070.00016.77
8.0.90.0040.00416.76
8.0.80.0120.00316.90
8.0.70.0000.00716.86
8.0.60.0030.00316.81
8.0.50.0050.00216.86
8.0.30.0070.01117.06
8.0.20.0170.02117.40
8.0.10.0040.00416.78
8.0.00.0060.01116.61
7.4.330.0000.00515.00
7.4.320.0000.00616.53
7.4.300.0030.00316.47
7.4.290.0000.00716.58
7.4.280.0000.00916.49
7.4.270.0040.00416.60
7.4.260.0030.00616.61
7.4.250.0000.00716.46
7.4.240.0030.00316.56
7.4.230.0040.00416.58
7.4.220.0110.00716.60
7.4.210.0130.00716.49
7.4.200.0030.00316.31
7.4.160.0150.00016.59
7.4.150.0100.01017.40
7.4.140.0050.01817.86
7.4.130.0070.01116.51
7.4.120.0100.00616.50
7.4.110.0060.01216.54
7.4.100.0140.01016.50
7.4.90.0120.00616.45
7.4.80.0060.01219.39
7.4.70.0120.00616.42
7.4.60.0100.00716.36
7.4.50.0040.00016.33
7.4.40.0100.00616.30
7.4.30.0130.00316.40
7.4.00.0070.00715.02
7.3.330.0000.00513.12
7.3.320.0000.00713.12
7.3.310.0000.00716.09
7.3.300.0070.00016.15
7.3.290.0100.01016.15
7.3.280.0090.00716.20
7.3.270.0120.00617.40
7.3.260.0030.01616.34
7.3.250.0090.00816.23
7.3.240.0060.01116.23
7.3.230.0120.00616.54
7.3.210.0100.00716.37
7.3.200.0090.01519.39
7.3.190.0070.01416.51
7.3.180.0160.00016.17
7.3.170.0090.00616.27
7.3.160.0060.00916.23
7.3.120.0100.00614.90
7.2.330.0120.00616.65
7.2.320.0120.00616.63
7.2.310.0120.00416.25
7.2.300.0060.01016.62
7.2.290.0120.01316.36
7.2.60.0070.00716.81
7.2.00.0060.00919.41
7.1.200.0100.00315.68
7.1.100.0080.00417.81
7.1.70.0030.00617.21
7.1.60.0100.01019.70
7.1.50.0080.01916.82
7.1.00.0070.07322.30
7.0.200.0030.00316.75
7.0.140.0070.07022.12
7.0.60.0030.05319.95
7.0.50.0070.08017.80
7.0.40.0170.07720.40
7.0.30.0370.07020.29
7.0.20.0430.03320.12
7.0.10.0030.09320.12
7.0.00.0130.05020.09
5.6.280.0000.07720.81
5.6.210.0000.05020.60
5.6.200.0030.04318.19
5.6.190.0130.03320.45
5.6.180.0500.07320.43
5.6.170.0300.07020.54
5.6.160.0170.06320.52
5.6.150.0130.06718.21
5.6.140.0000.06718.18
5.6.130.0130.08018.20
5.6.120.0100.08021.11
5.6.110.0070.04020.98
5.6.100.0130.07321.03
5.6.90.0070.08021.07
5.6.80.0030.05320.37
5.5.350.4400.04320.51
5.5.340.0030.03718.02
5.5.330.0130.07720.43
5.5.320.0070.06720.51
5.5.310.0200.04320.17
5.5.300.0000.05317.98
5.5.290.0000.04717.98
5.5.280.0070.08020.89
5.5.270.0100.05720.86
5.5.260.0170.07020.75
5.5.250.0030.07720.58
5.5.240.0200.07720.25
5.4.450.3470.03719.48
5.4.440.3270.04019.13
5.4.430.3670.04719.41
5.4.420.4000.03719.38
5.4.410.3700.04019.36
5.4.400.4030.03719.09
5.4.390.3170.03719.21
5.4.380.3970.03719.08
5.4.370.3500.03019.09
5.4.360.3870.04018.78
5.4.350.3070.04318.88
5.4.340.3700.04019.22
5.4.320.3430.03319.16
5.4.310.3530.04319.22
5.4.300.3500.03018.93
5.4.290.3430.03318.88
5.4.280.3370.04319.08
5.4.270.3470.04019.09
5.4.260.3170.03319.24
5.4.250.3300.04019.05
5.4.240.3400.03719.23
5.4.230.3330.04019.08
5.4.220.3230.03718.89
5.4.210.3530.03319.05
5.4.200.3470.03318.91
5.4.190.3970.03019.08
5.4.180.5100.03719.08
5.4.170.4130.03718.80
5.4.160.3500.04719.06
5.4.150.3300.03319.05
5.4.140.3570.04016.45
5.4.130.3370.03716.14
5.4.120.3470.03316.28
5.4.110.3570.03716.43
5.4.100.3300.03316.39
5.4.90.3570.03716.41
5.4.80.3730.03316.04
5.4.70.3270.02716.18
5.4.60.3200.03316.37
5.4.50.3430.03316.45
5.4.40.0000.04016.47
5.4.30.0070.03016.43
5.4.20.3470.04016.41
5.4.10.3230.03316.27
5.4.00.3200.02715.58
5.3.290.3030.04314.50
5.3.280.3400.04014.57
5.3.270.3300.03014.57
5.3.260.3400.03714.54
5.3.250.3430.04014.69
5.3.240.3430.04014.55
5.3.230.3430.02714.68
5.3.220.3070.04014.61
5.3.210.3630.03014.59
5.3.200.3400.03314.41
5.3.190.3430.03714.51
5.3.180.3870.03314.61
5.3.170.3500.03714.43
5.3.160.3300.03714.41
5.3.150.3100.04714.64
5.3.140.0070.04014.50
5.3.130.1630.03014.57
5.3.120.2900.04014.38
5.3.110.2900.04014.49
5.3.100.3000.03713.98
5.3.90.2770.02713.88
5.3.80.3100.04013.96
5.3.70.3200.03313.96
5.3.60.3330.03314.06
5.3.50.3200.03313.77
5.3.40.3330.04013.82
5.3.30.2330.04713.68
5.3.20.3430.03713.52
5.3.10.3330.02313.45
5.3.00.3470.03713.68
5.2.170.2930.02311.05
5.2.160.2600.03010.99
5.2.150.2900.02711.01
5.2.140.2630.02711.05
5.2.130.2870.02711.15
5.2.120.3430.03311.01
5.2.110.2630.02710.94
5.2.100.1830.03311.04
5.2.90.0100.05310.95
5.2.80.0130.06011.11
5.2.70.0030.04011.04
5.2.60.1730.04011.05
5.2.50.3330.03311.03
5.2.40.2570.03310.93
5.2.30.2870.03310.98
5.2.20.2830.02710.84
5.2.10.2100.03310.95
5.2.00.2430.03010.68
5.1.60.2270.0239.90
5.1.50.2530.0309.97
5.1.40.2100.0209.91
5.1.30.2470.02310.29
5.1.20.2270.02710.26
5.1.10.2130.02310.04
5.1.00.2400.02310.04
5.0.50.1430.0209.86
5.0.40.1570.0309.86
5.0.30.1600.0279.86
5.0.20.1300.0239.86
5.0.10.1400.0209.86
5.0.00.1430.0309.86
4.4.90.0000.0339.86
4.4.80.1330.0139.86
4.4.70.1430.0209.86
4.4.60.1170.0179.86
4.4.50.1200.0179.86
4.4.40.1400.0309.86
4.4.30.1030.0179.86
4.4.20.1330.0179.86
4.4.10.1170.0139.86
4.4.00.1500.0239.86
4.3.110.1400.0179.86
4.3.100.1570.0139.86
4.3.90.1200.0139.86
4.3.80.1430.0309.86
4.3.70.1570.0179.86
4.3.60.1130.0179.86
4.3.50.1070.0139.86
4.3.40.1470.0309.86
4.3.30.0770.0279.86
4.3.20.0900.0239.86
4.3.10.0900.0239.86
4.3.00.0830.0239.86

preferences:
40.77 ms | 401 KiB | 5 Q