3v4l.org

run code in 300+ PHP versions simultaneously
<?php function autocreate($classname) { if (substr($classname, -strlen('Exception')) == 'Exception') eval('class ' . $classname . ' extends Exception {};'); } spl_autoload_register('autocreate'); $x = new TestException(); var_dump(get_class($x)); $z = "echo 'moo';Exception"; $x = new $z(); 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.60.0090.01218.43
8.3.50.0130.00516.19
8.3.40.0190.00018.67
8.3.30.0130.00718.90
8.3.20.0060.00318.87
8.3.10.0050.00320.64
8.3.00.0060.00317.63
8.2.180.0100.01017.13
8.2.170.0070.00722.96
8.2.160.0070.00722.08
8.2.150.0000.00824.18
8.2.140.0080.00024.66
8.2.130.0050.00326.16
8.2.120.0080.00019.49
8.2.110.0030.00722.08
8.2.100.0040.00717.84
8.2.90.0080.00019.22
8.2.80.0080.00017.97
8.2.70.0000.00917.63
8.2.60.0000.00917.93
8.2.50.0030.00518.07
8.2.40.0030.00519.82
8.2.30.0000.00818.13
8.2.20.0000.00717.73
8.2.10.0040.00417.82
8.2.00.0040.00417.86
8.1.280.0140.00025.92
8.1.270.0090.00022.02
8.1.260.0060.00326.35
8.1.250.0100.01028.09
8.1.240.0100.01022.21
8.1.230.0090.00317.42
8.1.220.0040.00417.78
8.1.210.0000.00818.77
8.1.200.0080.00017.35
8.1.190.0030.00517.55
8.1.180.0070.00318.10
8.1.170.0080.00018.89
8.1.160.0030.00518.95
8.1.150.0040.00418.60
8.1.140.0000.00817.34
8.1.130.0030.00317.77
8.1.120.0000.00817.50
8.1.110.0000.00917.33
8.1.100.0000.00817.46
8.1.90.0040.00417.55
8.1.80.0000.00717.39
8.1.70.0030.00317.49
8.1.60.0070.00017.61
8.1.50.0040.00417.35
8.1.40.0050.00217.55
8.1.30.0000.00717.63
8.1.20.0060.00317.54
8.1.10.0000.00817.64
8.1.00.0040.00417.52
8.0.300.0000.00718.77
8.0.290.0050.00316.63
8.0.280.0030.00318.38
8.0.270.0080.00017.20
8.0.260.0060.00016.91
8.0.250.0050.00216.94
8.0.240.0040.00417.05
8.0.230.0030.00316.95
8.0.220.0000.00716.86
8.0.210.0000.00616.93
8.0.200.0070.00316.93
8.0.190.0040.00416.91
8.0.180.0000.00717.00
8.0.170.0040.00416.86
8.0.160.0000.00716.83
8.0.150.0000.00716.85
8.0.140.0080.00416.95
8.0.130.0030.00313.36
8.0.120.0050.00216.80
8.0.110.0000.00717.04
8.0.100.0000.00717.02
8.0.90.0040.00416.96
8.0.80.0090.01016.98
8.0.70.0030.00517.00
8.0.60.0040.00417.04
8.0.50.0040.00416.93
8.0.30.0120.00617.10
8.0.20.0110.01017.25
8.0.10.0040.00416.97
8.0.00.0170.01117.07
7.4.330.0020.00214.92
7.4.320.0000.00716.52
7.4.300.0060.00016.59
7.4.290.0040.00416.55
7.4.280.0060.00316.54
7.4.270.0040.00416.65
7.4.260.0060.00013.20
7.4.250.0000.00816.66
7.4.240.0070.00016.63
7.4.230.0050.00216.40
7.4.220.0150.00616.69
7.4.210.0060.00816.62
7.4.200.0000.00716.60
7.4.190.0030.00316.50
7.4.160.0100.01316.51
7.4.150.0090.00917.07
7.4.140.0130.01217.18
7.4.130.0080.00916.53
7.4.120.0100.00716.55
7.4.110.0000.02116.45
7.4.100.0120.01216.54
7.4.90.0110.00716.40
7.4.80.0090.01218.80
7.4.70.0140.01016.45
7.4.60.0110.00716.52
7.4.50.0080.00016.55
7.4.40.0000.01522.27
7.4.30.0040.01216.55
7.4.00.0060.01115.16
7.3.330.0030.00313.44
7.3.320.0000.00513.25
7.3.310.0000.00716.29
7.3.300.0000.00716.49
7.3.290.0100.00316.51
7.3.280.0110.00916.40
7.3.270.0110.01017.07
7.3.260.0060.01018.24
7.3.250.0050.01316.57
7.3.240.0120.00616.50
7.3.230.0090.00916.65
7.3.210.0070.01016.35
7.3.200.0070.01019.39
7.3.190.0060.01516.54
7.3.180.0050.01116.30
7.3.170.0140.00316.52
7.3.160.0110.00516.31
7.3.120.0030.01414.85
7.3.110.0040.01414.91
7.3.100.0080.00514.86
7.3.90.0050.00814.83
7.3.80.0070.00714.82
7.3.70.0050.00814.96
7.3.60.0050.00814.89
7.3.50.0050.00714.92
7.3.40.0000.01314.93
7.3.30.0050.01014.78
7.3.20.0050.00816.85
7.3.10.0120.00216.46
7.3.00.0080.00816.65
7.2.330.0070.01116.67
7.2.320.0030.01916.75
7.2.310.0070.01116.78
7.2.300.0030.01516.86
7.2.290.0070.00816.78
7.2.250.0050.01315.06
7.2.240.0080.01015.06
7.2.230.0050.00815.06
7.2.220.0000.01215.17
7.2.210.0030.01015.24
7.2.200.0030.01215.14
7.2.190.0080.00815.00
7.2.180.0080.00715.09
7.2.170.0050.00715.09
7.2.60.0090.00616.71
7.1.330.0050.00915.76
7.1.320.0030.00815.81
7.1.310.0030.00915.95
7.1.300.0070.00715.81
7.1.290.0060.00615.71
7.1.280.0110.00215.76
7.1.270.0050.00815.90
7.1.260.0090.00615.85
7.1.200.0120.00015.80
7.1.100.0040.00817.77
7.1.70.0030.00716.90
7.1.60.0030.02119.40
7.1.50.0100.01017.05
7.1.00.0030.07022.43
7.0.200.0030.00516.84
7.0.140.0000.07322.04
7.0.120.0030.03022.00
7.0.110.0100.05019.96
7.0.100.0170.06719.89
7.0.90.0130.08719.96
7.0.80.0130.06719.94
7.0.70.0130.07319.91
7.0.60.0100.06719.93
7.0.50.0170.04319.96
7.0.40.0130.04019.87
7.0.30.0070.06319.65
7.0.20.0070.07719.67
7.0.10.0130.06319.74
7.0.00.0070.07719.70
5.6.280.0000.07321.13
5.6.260.0030.08720.64
5.6.250.0070.07720.68
5.6.240.0130.04020.69
5.6.230.0100.07320.55
5.6.220.0100.07020.65
5.6.210.0030.08320.66
5.6.200.0170.07320.64
5.6.190.0170.06320.64
5.6.180.0070.04720.59
5.6.170.0070.07720.64
5.6.160.0030.05020.65
5.6.150.0100.04320.56
5.6.140.0070.04020.64
5.6.130.0070.04320.53
5.6.120.0070.08020.62
5.6.110.0100.06720.60
5.6.100.0070.08020.67
5.6.90.0030.05020.64
5.6.80.0000.08320.03
5.6.70.0170.06320.03
5.6.60.0070.08020.02
5.6.50.0030.05320.02
5.6.40.0100.06720.02
5.6.30.0100.07720.04
5.6.20.0070.05320.07
5.6.10.0130.07020.00
5.6.00.0030.08019.80
5.5.380.0070.03717.70
5.5.370.0030.07017.70
5.5.360.0100.07717.68
5.5.350.0100.07717.54
5.5.340.0100.07018.13
5.5.330.0070.07018.07
5.5.320.0270.06018.23
5.5.310.0100.07317.95
5.5.300.0170.07717.83
5.5.290.0070.06718.13
5.5.280.0170.07717.91
5.5.270.0030.04717.82
5.5.260.0100.03718.21
5.5.250.0070.08017.92
5.5.240.0070.07317.48
5.5.230.0100.07317.34
5.5.220.0070.07017.45
5.5.210.0170.06717.61
5.5.200.0070.03717.29
5.5.190.0030.08717.61
5.5.180.0100.07017.19
5.5.160.0070.04317.42
5.5.150.0030.05017.47
5.5.140.0030.04017.44
5.5.130.0100.03317.28
5.5.120.0100.02717.58
5.5.110.0000.04317.28
5.5.100.0000.04717.39
5.5.90.0000.03317.16
5.5.80.0030.03717.52
5.5.70.0030.03317.32
5.5.60.0030.03017.46
5.5.50.0000.04317.34
5.5.40.0030.04017.15
5.5.30.0100.02317.46
5.5.20.0030.05317.16
5.5.10.0000.07317.34
5.5.00.0030.03017.33
5.4.450.0030.06019.57
5.4.440.0000.07719.31
5.4.430.0100.07719.34
5.4.420.0100.06719.35
5.4.410.0070.08019.39
5.4.400.0070.07319.18
5.4.390.0170.06719.32
5.4.380.0070.08318.99
5.4.370.0030.05019.00
5.4.360.0070.07719.02
5.4.350.0100.06719.34
5.4.340.0030.07719.23
5.4.320.0000.08318.97
5.4.310.0070.04718.93
5.4.300.0070.04019.18
5.4.290.0100.03319.09
5.4.280.0000.03718.98
5.4.270.0030.03718.99
5.4.260.0000.04019.09
5.4.250.0070.03319.23
5.4.240.0030.03718.98
5.4.230.0030.04019.00
5.4.220.0000.03719.33
5.4.210.0000.04019.10
5.4.200.0000.04318.98
5.4.190.0030.04019.22
5.4.180.0000.03319.02
5.4.170.0100.02719.16
5.4.160.0000.07018.98
5.4.150.0030.04019.16
5.4.140.0070.03316.33
5.4.130.0000.03716.64
5.4.120.0030.07316.46
5.4.110.0070.03316.27
5.4.100.0100.03316.41
5.4.90.0000.03716.26
5.4.80.0070.03016.54
5.4.70.0030.03316.55
5.4.60.0030.03716.48
5.4.50.0070.03316.39
5.4.40.0030.04316.59
5.4.30.0030.04316.54
5.4.20.0030.03316.46
5.4.10.0070.03316.56
5.4.00.0100.02715.79
5.3.290.0030.06314.70
5.3.280.0030.04714.75
5.3.270.0030.07014.48
5.3.260.0100.03014.63
5.3.250.0000.05314.76
5.3.240.0000.04314.64
5.3.230.0030.03314.59
5.3.220.0070.03714.71
5.3.210.0030.04314.60
5.3.200.0030.03714.66
5.3.190.0000.03714.60
5.3.180.0030.03714.57
5.3.170.0030.03714.57
5.3.160.0030.04014.58
5.3.150.0070.03314.71
5.3.140.0000.04014.58
5.3.130.0030.03714.57
5.3.120.0100.03314.57
5.3.110.0000.04014.80
5.3.100.0000.04014.05
5.3.90.0030.03714.02
5.3.80.0000.04014.00
5.3.70.0030.03714.04
5.3.60.0030.03714.04
5.3.50.0030.03713.99
5.3.40.0030.04714.09
5.3.30.0000.03714.01
5.3.20.0000.04013.72
5.3.10.0100.03013.70
5.3.00.0130.02713.64
5.2.170.0070.04311.91
5.2.160.0100.02311.91
5.2.150.0000.03311.91
5.2.140.0070.03011.91
5.2.130.0000.03711.91
5.2.120.0000.03011.91
5.2.110.0000.03011.91
5.2.100.0030.02311.91
5.2.90.0030.02311.91
5.2.80.0000.03311.91
5.2.70.0070.02311.91
5.2.60.0070.02311.91
5.2.50.0030.03011.91
5.2.40.0000.03011.91
5.2.30.0070.02311.91
5.2.20.0070.02711.91
5.2.10.0030.05011.91
5.2.00.0030.06011.91
5.1.60.0000.04711.91
5.1.50.0030.05311.91
5.1.40.0100.04311.91
5.1.30.0030.04011.91
5.1.20.0070.05011.91
5.1.10.0130.04711.91
5.1.00.0030.05711.91
5.0.50.0030.04311.91
5.0.40.0030.04311.91
5.0.30.0070.05011.91
5.0.20.0030.03311.91
5.0.10.0070.04011.91
5.0.00.0070.06011.91
4.4.90.0030.02311.91
4.4.80.0000.03311.91
4.4.70.0070.01311.91
4.4.60.0030.01711.91
4.4.50.0000.02311.91
4.4.40.0030.05011.91
4.4.30.0030.03011.91
4.4.20.0070.03011.91
4.4.10.0030.03311.91
4.4.00.0070.04311.91
4.3.110.0070.01311.91
4.3.100.0000.04011.91
4.3.90.0070.03011.91
4.3.80.0070.04711.91
4.3.70.0030.01711.91
4.3.60.0130.02311.91
4.3.50.0070.01311.91
4.3.40.0030.03011.91
4.3.30.0030.03011.91
4.3.20.0030.02711.91
4.3.10.0070.02311.91
4.3.00.0000.03311.91

preferences:
42.43 ms | 401 KiB | 5 Q