3v4l.org

run code in 300+ PHP versions simultaneously
<?php class PreviousException extends \Exception {} class One extends \RuntimeException { // Just a standard exception } class Two extends \RuntimeException{ // An exception with custom constructor parameters public function __construct($customMessage, PreviousException $e) { parent::__construct($customMessage . "LOL", $e->getCode(), $e); } } try { throw new Two('Throwing "Two", but catch will receive a different class type if I specify just "\Exception" in the catch statement not "Two"', new PreviousException()); } catch (\Exception $e) { var_dump($e); }

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.0070.00718.58
8.3.30.0080.00818.57
8.3.20.0040.00420.34
8.3.10.0030.00621.77
8.3.00.0040.00417.66
8.2.170.0060.00822.96
8.2.160.0100.00320.44
8.2.150.0000.00824.18
8.2.140.0080.00024.66
8.2.130.0070.00022.25
8.2.120.0040.00426.35
8.2.110.0100.00020.47
8.2.100.0040.00717.97
8.2.90.0040.00419.23
8.2.80.0000.00818.05
8.2.70.0050.00317.63
8.2.60.0050.00318.05
8.2.50.0040.00418.10
8.2.40.0030.00522.17
8.2.30.0000.00920.98
8.2.20.0000.00718.05
8.2.10.0000.00718.15
8.2.00.0040.00417.92
8.1.270.0050.00322.19
8.1.260.0000.00726.35
8.1.250.0040.00428.09
8.1.240.0070.00322.68
8.1.230.0030.00819.16
8.1.220.0000.00917.79
8.1.210.0040.00418.77
8.1.200.0070.00317.35
8.1.190.0000.00817.35
8.1.180.0050.00318.10
8.1.170.0030.00518.64
8.1.160.0000.00718.93
8.1.150.0000.00720.58
8.1.140.0000.00819.57
8.1.130.0080.00018.89
8.1.120.0040.00417.36
8.1.110.0040.00417.46
8.1.100.0060.00317.45
8.1.90.0060.00317.52
8.1.80.0000.00817.41
8.1.70.0030.00317.35
8.1.60.0050.00317.46
8.1.50.0040.00417.41
8.1.40.0000.00817.48
8.1.30.0000.00817.58
8.1.20.0050.00317.62
8.1.10.0040.00417.53
8.1.00.0000.00817.52
8.0.300.0000.00818.77
8.0.290.0060.00316.73
8.0.280.0050.00218.35
8.0.270.0070.00317.23
8.0.260.0030.00516.80
8.0.250.0000.00716.99
8.0.240.0050.00216.97
8.0.230.0070.00317.04
8.0.220.0000.00716.86
8.0.210.0070.00016.91
8.0.200.0060.00017.07
8.0.190.0030.00516.91
8.0.180.0050.00317.00
8.0.170.0070.00017.00
8.0.160.0000.00716.91
8.0.150.0030.00316.93
8.0.140.0070.00016.84
8.0.130.0000.00513.41
8.0.120.0000.00716.96
8.0.110.0040.00416.76
8.0.100.0040.00416.85
8.0.90.0000.00816.89
8.0.80.0070.01016.98
8.0.70.0050.00317.05
8.0.60.0040.00416.86
8.0.50.0040.00416.97
8.0.30.0180.01216.94
8.0.20.0110.01017.40
8.0.10.0000.00717.03
8.0.00.0130.01017.00
7.4.330.0020.00215.55
7.4.320.0000.00716.50
7.4.300.0000.00716.60
7.4.290.0030.00516.50
7.4.280.0000.00716.57
7.4.270.0000.00716.50
7.4.260.0000.00513.38
7.4.250.0040.00416.54
7.4.240.0000.00816.62
7.4.230.0030.00316.62
7.4.220.0130.00616.48
7.4.210.0040.01016.57
7.4.200.0000.00816.34
7.4.160.0080.01016.47
7.4.150.0120.00617.40
7.4.140.0150.00517.86
7.4.130.0160.00316.56
7.4.120.0140.00916.59
7.4.110.0040.01316.39
7.4.100.0030.01516.42
7.4.90.0030.01316.68
7.4.80.0180.00719.39
7.4.70.0080.00816.29
7.4.60.0120.00616.34
7.4.50.0030.00816.60
7.4.40.0110.00616.44
7.4.30.0130.00616.55
7.4.00.0070.01014.87
7.3.330.0000.00613.39
7.3.320.0030.00313.20
7.3.310.0000.00716.15
7.3.300.0070.00016.38
7.3.290.0030.00316.25
7.3.280.0080.00716.36
7.3.270.0090.00917.40
7.3.260.0050.01316.55
7.3.250.0110.00916.50
7.3.240.0080.01016.43
7.3.230.0080.01516.50
7.3.210.0130.00416.47
7.3.200.0120.00616.58
7.3.190.0060.01616.51
7.3.180.0160.00016.45
7.3.170.0030.01216.42
7.3.160.0160.00716.45
7.3.120.0100.00314.86
7.3.110.0030.01214.88
7.3.100.0110.00414.97
7.3.90.0040.01114.89
7.3.80.0090.00314.90
7.3.70.0090.00614.81
7.3.60.0030.01014.89
7.3.50.0090.00614.79
7.3.40.0070.01014.80
7.3.30.0030.00914.76
7.3.20.0080.00816.59
7.3.10.0040.01116.53
7.3.00.0070.00416.37
7.2.330.0100.01016.56
7.2.320.0090.00916.71
7.2.310.0250.00016.78
7.2.300.0070.01416.63
7.2.290.0120.00616.45
7.2.240.0030.01314.91
7.2.230.0140.00315.22
7.2.220.0070.01014.98
7.2.210.0030.01015.17
7.2.200.0090.00615.09
7.2.190.0060.01014.87
7.2.180.0000.01814.97
7.2.170.0030.01015.05
7.2.160.0060.00915.05
7.2.150.0070.00716.82
7.2.140.0060.00616.70
7.2.130.0030.01316.89
7.2.120.0040.01116.65
7.2.110.0060.00616.89
7.2.100.0110.00316.84
7.2.90.0040.00816.92
7.2.80.0080.00816.78
7.2.70.0030.01216.90
7.2.60.0020.01216.95
7.2.50.0040.00416.75
7.2.40.0090.00616.99
7.2.30.0090.00616.91
7.2.20.0080.00416.88
7.2.10.0000.01616.84
7.2.00.0000.01518.16
7.1.330.0090.00615.71
7.1.320.0080.00615.74
7.1.310.0060.00615.75
7.1.300.0070.00715.69
7.1.290.0080.00815.63
7.1.280.0030.01015.74
7.1.270.0070.00715.71
7.1.260.0060.00615.57
7.1.250.0030.01315.75
7.1.200.0030.00915.83
7.1.100.0000.01118.18
7.1.70.0000.01016.85
7.1.60.0070.00417.32
7.1.50.0070.00316.63
7.1.40.0030.01216.46
7.1.30.0030.00716.58
7.1.20.0000.01216.71
7.1.10.0030.00716.52
7.1.00.0060.00316.57
7.0.200.0000.01016.80
7.0.190.0040.00416.68
7.0.180.0000.00816.34
7.0.170.0030.00616.34
7.0.160.0000.00916.33
7.0.150.0030.00616.16
7.0.140.0000.00816.41
7.0.130.0120.00914.78
7.0.120.0240.00714.98
7.0.110.0030.00516.39
7.0.100.0000.00716.47
7.0.90.0000.01016.14
7.0.80.0050.00316.44
7.0.70.0000.00916.45
7.0.60.0000.00816.11
7.0.50.0000.00816.41
7.0.40.0040.00414.78
7.0.30.0000.00814.78
7.0.20.0030.00514.78
7.0.10.0000.00714.78
7.0.00.0030.00614.78

preferences:
39.83 ms | 400 KiB | 5 Q