3v4l.org

run code in 300+ PHP versions simultaneously
<?php namespace Foo; function autocreate($classname) { if (substr($classname, -strlen('Exception')) == 'Exception') eval('class ' . $classname . ' extends Exception {};'); } spl_autoload_register('Foo\autocreate'); $x = new TestException(); var_dump(get_class($x)); $x = new Foo\TestException(); var_dump(get_class($x));

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.40.0100.01018.96
8.3.30.0120.00918.95
8.3.20.0030.00618.85
8.3.10.0090.00020.42
8.3.00.0080.00019.51
8.2.170.0120.00622.96
8.2.160.0130.00022.13
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0080.00026.16
8.2.120.0050.00219.70
8.2.110.0070.00719.29
8.2.100.0090.00317.60
8.2.90.0000.01017.75
8.2.80.0050.00517.97
8.2.70.0060.00317.93
8.2.60.0000.00818.11
8.2.50.0030.00518.10
8.2.40.0000.00719.45
8.2.30.0000.00819.19
8.2.20.0040.00417.61
8.2.10.0040.00417.76
8.2.00.0030.00617.71
8.1.270.0080.00023.99
8.1.260.0080.00626.35
8.1.250.0060.00328.09
8.1.240.0080.00019.03
8.1.230.0000.01218.95
8.1.220.0000.00817.74
8.1.210.0060.00318.77
8.1.200.0030.00617.11
8.1.190.0050.00317.22
8.1.180.0040.00418.10
8.1.170.0000.00818.65
8.1.160.0040.00418.89
8.1.150.0040.00418.80
8.1.140.0000.00717.29
8.1.130.0040.00417.69
8.1.120.0040.00417.39
8.1.110.0040.00417.41
8.1.100.0080.00017.43
8.1.90.0080.00017.43
8.1.80.0020.00517.40
8.1.70.0070.00017.37
8.1.60.0040.00417.57
8.1.50.0050.00217.45
8.1.40.0060.00317.51
8.1.30.0020.00517.44
8.1.20.0050.00317.54
8.1.10.0060.00317.53
8.1.00.0040.00417.43
8.0.300.0020.00518.77
8.0.290.0000.00916.63
8.0.280.0080.00018.54
8.0.270.0030.00317.29
8.0.260.0000.00718.63
8.0.250.0070.00017.04
8.0.240.0050.00316.91
8.0.230.0110.00016.92
8.0.220.0000.00716.94
8.0.210.0000.00716.99
8.0.200.0030.00316.93
8.0.190.0000.00817.10
8.0.180.0040.00416.99
8.0.170.0030.00616.98
8.0.160.0040.00417.06
8.0.150.0070.00016.95
8.0.140.0000.01116.82
8.0.130.0000.00613.43
8.0.120.0040.00416.84
8.0.110.0000.00716.99
8.0.100.0030.00616.82
8.0.90.0070.00016.96
8.0.80.0110.00417.02
8.0.70.0040.00416.98
8.0.60.0050.00216.79
8.0.50.0030.00516.76
8.0.30.0140.00517.16
8.0.20.0120.00717.40
8.0.10.0050.00316.99
8.0.00.0110.00916.96
7.4.330.0030.00313.43
7.4.320.0060.00016.51
7.4.300.0030.00316.52
7.4.290.0040.00416.63
7.4.280.0040.00416.44
7.4.270.0000.00716.46
7.4.260.0030.00313.43
7.4.250.0040.00416.61
7.4.240.0000.00816.48
7.4.230.0070.00016.52
7.4.220.0130.01316.69
7.4.210.0070.00916.55
7.4.200.0040.00416.65
7.4.190.0070.00016.80
7.4.160.0130.00716.60
7.4.150.0110.00717.40
7.4.140.0090.00717.21
7.4.130.0100.01316.44
7.4.120.0120.00416.42
7.4.110.0070.01016.46
7.4.100.0120.00916.66
7.4.90.0120.00916.63
7.4.80.0060.01119.03
7.4.70.0070.01016.62
7.4.60.0090.00616.40
7.4.50.0040.00416.63
7.4.40.0060.00922.27
7.4.30.0100.00616.38
7.4.00.0130.00314.81
7.3.330.0000.00613.33
7.3.320.0050.00013.36
7.3.310.0000.00716.37
7.3.300.0060.00316.36
7.3.290.0030.01416.32
7.3.280.0070.01016.40
7.3.270.0150.00317.40
7.3.260.0110.00618.24
7.3.250.0050.01616.43
7.3.240.0060.01116.51
7.3.230.0090.00916.43
7.3.210.0120.00616.38
7.3.200.0150.00919.39
7.3.190.0130.01016.41
7.3.180.0160.00816.59
7.3.170.0170.00416.38
7.3.160.0120.00416.50
7.3.120.0000.01714.60
7.2.330.0030.01716.46
7.2.320.0040.01416.46
7.2.310.0070.01016.52
7.2.300.0110.00616.69
7.2.290.0060.01316.64
7.2.80.0040.00816.63
7.2.60.0120.00316.73
7.2.00.0090.00619.54
7.1.200.0030.00915.58
7.1.100.0080.00317.93
7.1.70.0040.00417.14
7.1.60.0100.01419.40
7.1.50.0000.01516.75
7.1.00.0030.07322.36
7.0.200.0080.00317.01
7.0.140.0030.07322.18
7.0.60.0100.08019.90
7.0.50.0030.06017.91
7.0.40.0030.05020.24
7.0.30.0270.05320.33
7.0.20.0270.07320.09
7.0.10.0130.04720.06
7.0.00.0030.08720.08
5.6.280.0100.06321.02
5.6.210.0100.05720.55
5.6.200.0030.04318.26
5.6.190.0100.06020.52
5.6.180.0300.07320.39
5.6.170.0270.08020.59
5.6.160.0100.07320.54
5.6.150.0100.03318.19
5.6.140.0070.07018.19
5.6.130.0070.06718.26
5.6.120.0030.09020.99
5.6.110.0030.08720.97
5.6.100.0100.07321.02
5.6.90.0170.07320.98
5.6.80.0100.07720.41
5.6.70.0100.04720.40
5.5.350.0100.08320.46
5.5.340.0100.03718.09
5.5.330.0030.05320.19
5.5.320.0300.06720.42
5.5.310.0200.04720.39
5.5.300.0000.05017.95
5.5.290.0100.06017.98
5.5.280.0130.05020.78
5.5.270.0070.08720.76
5.5.260.0130.08720.82
5.5.250.0130.07720.60
5.5.240.0070.08020.25
5.4.450.0270.04719.50
5.4.440.0300.06719.52
5.4.430.0200.04319.41
5.4.420.0230.04719.16
5.4.410.0270.05719.18
5.4.400.0200.06019.15
5.4.390.0300.04719.24
5.4.380.0200.06319.22
5.4.370.0170.05019.12
5.4.360.0230.07019.09
5.4.350.0270.06319.10
5.4.340.0200.06719.14
5.4.320.0270.05719.16
5.4.310.0270.03719.20
5.4.300.0200.07319.20
5.4.290.0270.07019.12
5.4.280.0100.04719.20
5.4.270.0300.06719.21
5.4.260.0230.07019.22
5.4.250.0270.05719.08
5.4.240.0200.07318.98
5.4.230.0330.05719.23
5.4.220.0270.06018.95
5.4.210.0230.04318.80
5.4.200.0200.07718.97
5.4.190.0270.06719.21
5.4.180.0200.04318.83
5.4.170.0170.04719.16
5.4.160.0170.04318.93
5.4.150.0270.06719.04
5.4.140.0230.04316.38
5.4.130.0230.04016.32
5.4.120.0200.07016.38
5.4.110.0230.07316.39
5.4.100.0170.04716.46
5.4.90.0230.06716.40
5.4.80.0230.04316.44
5.4.70.0170.04316.44
5.4.60.0270.06016.33
5.4.50.0170.04316.16
5.4.40.0270.05016.38
5.4.30.0230.03316.25
5.4.20.0270.06316.18
5.4.10.0200.03716.53
5.4.00.0200.04015.96
5.3.290.0270.03314.76
5.3.280.0270.07314.65
5.3.270.0200.04714.53
5.3.260.0270.07314.62
5.3.250.0300.05314.84
5.3.240.0270.03314.51
5.3.230.0300.03714.61
5.3.220.0200.04314.67
5.3.210.0230.03714.70
5.3.200.0300.04014.65
5.3.190.0270.06714.48
5.3.180.0300.06014.50
5.3.170.0270.04714.48
5.3.160.0230.08014.54
5.3.150.0230.07714.54
5.3.140.0230.03714.68
5.3.130.0300.07314.52
5.3.120.0200.05314.56
5.3.110.0230.04714.46
5.3.100.0300.06013.95
5.3.90.0270.06713.94
5.3.80.0170.04714.14
5.3.70.0270.04314.26
5.3.60.0230.06314.03
5.3.50.0170.04713.86
5.3.40.0230.07013.87
5.3.30.0200.04013.84
5.3.20.0200.03713.71
5.3.10.0130.04713.56
5.3.00.0300.06313.65
5.2.170.0170.02712.30
5.2.160.0130.03012.30
5.2.150.0130.03012.30
5.2.140.0170.03312.30
5.2.130.0200.04712.30
5.2.120.0200.06012.30
5.2.110.0170.03012.30
5.2.100.0230.05712.30
5.2.90.0130.03012.30
5.2.80.0230.03012.30
5.2.70.0200.06312.30
5.2.60.0130.03012.30
5.2.50.0130.03012.30
5.2.40.0100.03312.30
5.2.30.0130.03012.30
5.2.20.0130.02712.30
5.2.10.0200.02012.30
5.2.00.0130.03012.30
5.1.60.0130.02712.30
5.1.50.0230.04712.30
5.1.40.0170.02312.30
5.1.30.0130.02312.30
5.1.20.0170.02312.30
5.1.10.0130.02312.30
5.1.00.0100.02712.30
5.0.50.0070.02012.30
5.0.40.0070.02712.30
5.0.30.0030.03312.30
5.0.20.0100.01712.30
5.0.10.0070.02312.30
5.0.00.0100.03012.30
4.4.90.0030.01712.30
4.4.80.0070.03312.30
4.4.70.0100.03312.30
4.4.60.0170.01712.30
4.4.50.0070.01712.30
4.4.40.0170.04712.30
4.4.30.0100.01312.30
4.4.20.0100.02012.30
4.4.10.0070.01312.30
4.4.00.0030.02712.30
4.3.110.0000.02012.30
4.3.100.0030.01712.30
4.3.90.0030.02012.30
4.3.80.0100.02012.30
4.3.70.0070.01712.30
4.3.60.0070.03012.30
4.3.50.0100.03312.30
4.3.40.0100.05012.30
4.3.30.0100.03312.30
4.3.20.0070.02012.30
4.3.10.0030.02012.30
4.3.00.0030.01712.30

preferences:
54.81 ms | 400 KiB | 5 Q