3v4l.org

run code in 300+ PHP versions simultaneously
<?php echo "<?php\n\n"; foreach (['e', 'f', 'n', 'r', 't', 'v'] as $c) { echo "define('\\\\{$c}', \"\\{$c}\");\n"; } for ($i = 0; $i < 256; $i++) { $str = str_pad(strtoupper(dechex($i)), 2, '0', STR_PAD_LEFT); $p1 = [$str[0]]; if ($str[0] >= 'A' && $str[0] <= 'F') { $p1[] = strtolower($str[0]); } $p2 = [$str[1]]; if ($str[1] >= 'A' && $str[1] <= 'F') { $p2[] = strtolower($str[1]); } foreach ($p1 as $c1) foreach ($p2 as $c2) echo "define('\\\\x{$c1}{$c2}', \"\\x{$str}\");\n"; }

Abusive script

This script was stopped while abusing our resources

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.110.0040.00416.54
8.3.100.0030.00724.06
8.3.90.0040.00426.77
8.3.80.0070.00418.43
8.3.70.0110.00418.28
8.3.60.0120.00916.61
8.3.50.0170.00822.00
8.3.40.0090.00618.70
8.3.30.0150.00019.07
8.3.20.0040.00420.16
8.3.10.0050.00321.82
8.3.00.0040.00419.91
8.2.230.0000.00920.94
8.2.220.0050.00537.54
8.2.210.0110.01126.77
8.2.200.0000.00916.75
8.2.190.0060.00916.63
8.2.180.0060.00916.75
8.2.170.0160.00622.96
8.2.160.0090.00622.21
8.2.150.0060.01325.66
8.2.140.0030.00524.66
8.2.130.0080.00026.16
8.2.120.0000.00919.36
8.2.110.0040.00719.27
8.2.100.0040.00817.72
8.2.90.0040.00419.20
8.2.80.0000.00818.01
8.2.70.0040.00417.50
8.2.60.0030.00618.05
8.2.50.0030.00518.07
8.2.40.0030.00618.06
8.2.30.0050.00319.38
8.2.20.0000.00817.72
8.2.10.0000.00818.04
8.2.00.0030.00617.75
8.1.290.0070.00330.84
8.1.280.0150.00025.92
8.1.270.0040.00423.86
8.1.260.0050.00326.35
8.1.250.0040.00428.09
8.1.240.0060.00322.45
8.1.230.0060.00620.94
8.1.220.0040.00418.77
8.1.210.0000.00919.09
8.1.200.0090.00017.35
8.1.190.0030.00517.53
8.1.180.0040.00418.10
8.1.170.0090.00018.58
8.1.160.0050.00518.91
8.1.150.0000.00718.77
8.1.140.0000.00817.45
8.1.130.0030.00317.85
8.1.120.0030.00617.52
8.1.110.0040.00417.48
8.1.100.0040.00417.47
8.1.90.0030.00517.51
8.1.80.0000.00817.47
8.1.70.0050.00217.46
8.1.60.0070.00317.59
8.1.50.0000.00917.56
8.1.40.0090.00017.49
8.1.30.0030.00617.59
8.1.20.0060.00317.66
8.1.10.0000.00817.46
8.1.00.0040.00417.48
8.0.300.0080.00319.89
8.0.290.0000.00717.18
8.0.280.0000.00718.46
8.0.270.0070.00017.17
8.0.260.0050.00517.34
8.0.250.0040.00416.88
8.0.240.0040.00416.96
8.0.230.0000.00716.90
8.0.220.0040.00416.89
8.0.210.0070.00016.93
8.0.200.0030.00316.90
8.0.190.0000.00816.93
8.0.180.0040.00416.85
8.0.170.0000.00816.82
8.0.160.0040.00416.91
8.0.150.0040.00416.84
8.0.140.0030.00916.84
8.0.130.0000.00613.41
8.0.120.0050.00516.78
8.0.110.0040.00416.96
8.0.100.0040.00416.90
8.0.90.0040.00416.89
8.0.80.0140.01116.93
8.0.70.0030.00616.91
8.0.60.0040.00416.88
8.0.50.0000.00716.71
8.0.30.0100.01317.18
8.0.20.0110.00917.40
8.0.10.0040.00417.09
8.0.00.0100.00916.75
7.4.330.0030.00315.02
7.4.320.0030.00316.52
7.4.300.0030.00316.51
7.4.290.0000.00716.62
7.4.280.0040.00416.49
7.4.270.0030.00316.47
7.4.260.0040.00416.53
7.4.250.0030.00516.57
7.4.240.0060.00116.63
7.4.230.0000.00716.68
7.4.220.0120.00616.58
7.4.210.0110.01016.56
7.4.200.0000.00716.64
7.4.160.0120.00716.50
7.4.150.0140.00817.40
7.4.140.0170.00517.86
7.4.130.0070.01216.54
7.4.120.0090.01216.47
7.4.110.0080.01316.48
7.4.100.0160.01016.54
7.4.90.0090.01216.61
7.4.80.0090.00919.39
7.4.70.0090.00916.43
7.4.60.0060.01516.44
7.4.50.0030.00616.38
7.4.40.0070.01116.35
7.4.30.0100.01016.64
7.4.00.0000.01914.76
7.3.330.0030.00313.14
7.3.320.0000.00613.18
7.3.310.0050.00216.50
7.3.300.0000.00716.34
7.3.290.0040.01116.35
7.3.280.0050.01416.35
7.3.270.0110.00817.40
7.3.260.0200.00016.39
7.3.250.0090.01316.56
7.3.240.0090.01216.31
7.3.230.0060.01516.47
7.3.210.0120.00616.39
7.3.200.0090.01719.39
7.3.190.0070.01316.61
7.3.180.0090.00916.55
7.3.170.0190.03016.47
7.3.160.0070.01116.32
7.2.330.0180.00316.74
7.2.320.0170.00416.66
7.2.310.0150.00416.78
7.2.300.0080.01216.69
7.2.290.0100.01016.63
7.2.60.0070.01016.94
7.1.200.0080.00315.89
7.1.100.0110.00418.18
7.1.70.0020.00517.01
7.1.60.0150.01119.34
7.1.50.0130.01316.91
7.1.00.0000.07722.54
7.0.200.0000.00816.79
7.0.140.0000.05322.21
7.0.60.0100.03720.02
7.0.50.0130.07717.80
7.0.40.0130.03720.40
7.0.30.0330.05020.18
7.0.20.0230.08320.18
7.0.10.0170.05720.05
7.0.00.0070.08320.09
5.6.210.0030.04020.63
5.6.200.0030.05718.18
5.6.190.0100.03720.43
5.6.180.0230.07320.61
5.6.170.0370.06720.61
5.6.160.0100.05320.52
5.6.150.0070.04318.11
5.6.140.0070.04018.20
5.6.130.0070.08018.17
5.6.120.0070.08321.01
5.6.110.0070.09021.09
5.6.100.0130.06721.13
5.6.90.0100.08321.02
5.6.80.0030.06020.45
5.5.350.0070.04020.50
5.5.340.0100.08018.00
5.5.330.0130.07320.23
5.5.320.0300.04720.18
5.5.310.0330.08020.27
5.5.300.0200.07017.88
5.5.290.0070.07317.90
5.5.280.0100.04020.88
5.5.270.0000.04320.67
5.5.260.0100.08020.68
5.5.250.0000.08020.69
5.5.240.0200.07320.05
5.4.450.0570.04319.48
5.4.440.0070.03319.56
5.4.430.0200.04319.56
5.4.420.0100.05319.51
5.4.410.0170.05718.96
5.4.400.0100.07018.75
5.4.390.0170.04718.50
5.4.380.0170.05718.59
5.4.370.0200.04718.63
5.4.360.0070.05718.74
5.4.350.0070.04013.67
5.4.340.0030.04313.73
5.4.320.0100.04014.30
5.4.310.0170.03714.11
5.4.300.0130.03714.14
5.4.290.0230.02714.20
5.4.280.0130.03714.04
5.4.270.0170.03314.07
5.4.260.0130.04014.02
5.4.250.0170.04314.03
5.4.240.0170.03014.05
5.4.230.0170.03714.07
5.4.220.0270.03014.01
5.4.210.0130.05314.26
5.4.200.0200.03314.21
5.4.190.0100.03714.09
5.4.180.0130.03314.02
5.4.170.0170.03014.09
5.4.160.0170.03314.12
5.4.150.0000.04714.05
5.4.140.0200.03313.77
5.4.130.0030.04713.68
5.4.120.0070.04013.65
5.4.110.0100.04013.72
5.4.100.0230.02713.72
5.4.90.0100.04013.66
5.4.80.0130.03713.68
5.4.70.0070.04013.70
5.4.60.0100.03713.71
5.4.50.0070.04713.66
5.4.40.0170.03013.64
5.4.30.0030.04313.70
5.4.20.0100.03713.68
5.4.10.0070.03713.63
5.4.00.0100.05013.13
5.3.290.0100.04714.51
5.3.280.0130.04314.58
5.3.270.0130.03714.66
5.3.260.0100.04314.64
5.3.250.0100.03714.53
5.3.240.0170.03314.54
5.3.230.0130.03314.53
5.3.220.0100.04014.48
5.3.210.0130.03314.61
5.3.200.0100.04314.48
5.3.190.0170.03714.59
5.3.180.0100.03714.46
5.3.170.0100.03714.47
5.3.160.0030.04314.62
5.3.150.0200.02714.46
5.3.140.0100.04014.59
5.3.130.0030.04714.58
5.3.120.0100.04314.52
5.3.110.0130.03714.47
5.3.100.0070.04313.91
5.3.90.0100.04014.03
5.3.80.0130.03313.90
5.3.70.0070.04314.00
5.3.60.0100.04013.99
5.3.50.0100.04013.92
5.3.40.0170.03313.81
5.3.30.0070.04013.92
5.3.20.0170.03313.74
5.3.10.0170.03313.57
5.3.00.0170.03313.57
5.2.170.0070.03010.99
5.2.160.0170.03011.00
5.2.150.0100.03711.03
5.2.140.0130.03311.04
5.2.130.0100.03711.10
5.2.120.0130.02311.00
5.2.110.0100.04311.07
5.2.100.0130.03010.96
5.2.90.0100.03711.08
5.2.80.0030.04311.09
5.2.70.0070.03311.02
5.2.60.0070.03310.96
5.2.50.0100.03310.93
5.2.40.0070.03310.99
5.2.30.0170.02311.04
5.2.20.0200.02011.04
5.2.10.0030.03710.82
5.2.00.0030.03310.80
5.1.60.0100.0239.92
5.1.50.0130.02310.05
5.1.40.0100.02310.05
5.1.30.0030.03010.31
5.1.20.0070.04010.32
5.1.10.0200.02310.18
5.1.00.0030.03010.09
5.0.50.0030.0278.46
5.0.40.0100.0308.36
5.0.30.0070.0308.34
5.0.20.0000.0238.37
5.0.10.0000.0238.23
5.0.00.0070.0308.14
4.4.90.0030.0175.77
4.4.80.0030.0175.82
4.4.70.0030.0175.88
4.4.60.0030.0175.80
4.4.50.0030.0175.86
4.4.40.0000.0275.78
4.4.30.0070.0175.79
4.4.20.0000.0206.00
4.4.10.0030.0175.89
4.4.00.0070.0235.87
4.3.110.0070.0135.74
4.3.100.0000.0235.78
4.3.90.0030.0175.74
4.3.80.0070.0305.75
4.3.70.0070.0175.71
4.3.60.0070.0175.72
4.3.50.0070.0135.78
4.3.40.0070.0305.69
4.3.30.0030.0134.62
4.3.20.0000.0174.56
4.3.10.0030.0134.43
4.3.00.0000.01316.52

preferences:
64.11 ms | 403 KiB | 5 Q