3v4l.org

run code in 300+ PHP versions simultaneously
<?php class CustomException extends Exception { public $object; public function __construct(string $msg, SomeClass $object) { $this->object = $object; parent::__construct($msg); } } class SomeClass { public function __construct() { throw new CustomException("Invalid parameters!", $this); } } try { $a = new SomeClass(); } catch (CustomException $e) { $a = $e->object; } var_dump($a);

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.130.0040.00418.52
8.3.120.0080.00020.82
8.3.110.0000.00820.94
8.3.100.0070.01024.06
8.3.90.0070.00726.77
8.3.80.0050.00518.57
8.3.70.0030.01716.63
8.3.60.0150.00016.48
8.3.50.0160.00323.59
8.3.40.0120.00321.98
8.3.30.0040.01118.61
8.3.20.0040.00424.18
8.3.10.0040.00424.66
8.3.00.0060.00326.16
8.2.250.0090.00918.48
8.2.240.0030.00718.33
8.2.230.0030.00622.58
8.2.220.0140.00737.54
8.2.210.0160.00326.77
8.2.200.0040.00416.38
8.2.190.0160.00016.75
8.2.180.0090.00925.92
8.2.170.0110.00319.08
8.2.160.0030.01422.96
8.2.150.0000.00725.66
8.2.140.0040.00424.66
8.2.130.0000.00726.16
8.2.120.0080.00021.13
8.2.110.0090.00020.43
8.2.100.0090.00317.85
8.2.90.0040.00418.09
8.2.80.0000.00917.97
8.2.70.0040.00417.63
8.2.60.0000.00817.91
8.2.50.0060.00318.05
8.2.40.0040.00418.22
8.2.30.0000.00718.10
8.2.20.0040.00417.93
8.2.10.0000.00919.23
8.2.00.0000.00719.17
8.1.300.0080.00018.17
8.1.290.0050.00530.84
8.1.280.0040.01125.92
8.1.270.0040.00423.99
8.1.260.0080.00026.35
8.1.250.0000.00828.09
8.1.240.0070.00322.19
8.1.230.0080.00320.94
8.1.220.0040.00417.74
8.1.210.0030.00518.84
8.1.200.0090.00017.35
8.1.190.0080.00017.23
8.1.180.0050.00318.10
8.1.170.0000.00718.66
8.1.160.0080.00318.84
8.1.150.0030.00618.84
8.1.140.0060.00318.89
8.1.130.0000.00820.24
8.1.120.0080.00017.43
8.1.110.0040.00417.46
8.1.100.0070.00017.44
8.1.90.0000.00717.46
8.1.80.0090.00017.46
8.1.70.0000.00717.46
8.1.60.0030.00517.62
8.1.50.0030.00517.50
8.1.40.0000.00717.50
8.1.30.0070.00017.66
8.1.20.0050.00317.65
8.1.10.0050.00517.48
8.1.00.0040.00817.51
8.0.300.0040.00420.04
8.0.290.0000.00816.63
8.0.280.0030.00618.29
8.0.270.0030.00317.91
8.0.260.0050.00320.18
8.0.250.0000.00716.91
8.0.240.0000.00716.99
8.0.230.0000.00716.93
8.0.220.0000.00716.84
8.0.210.0000.00816.81
8.0.200.0030.00316.95
8.0.190.0040.00416.96
8.0.180.0040.00416.88
8.0.170.0040.00416.80
8.0.160.0040.00416.88
8.0.150.0070.00016.77
8.0.140.0000.01116.87
8.0.130.0000.00513.37
8.0.120.0040.00416.91
8.0.110.0000.00816.96
8.0.100.0030.00416.86
8.0.90.0000.00817.00
8.0.80.0040.01416.96
8.0.70.0000.00716.90
8.0.60.0030.00516.89
8.0.50.0000.00816.86
8.0.30.0130.00417.22
8.0.20.0070.01116.95
8.0.10.0040.00417.05
8.0.00.0100.01016.74
7.4.330.0020.00215.55
7.4.320.0050.00216.45
7.4.300.0050.00216.42
7.4.290.0050.00316.45
7.4.280.0080.00016.50
7.4.270.0040.00316.57
7.4.260.0000.00713.25
7.4.250.0040.00416.51
7.4.240.0040.00316.58
7.4.230.0000.00616.68
7.4.220.0020.00516.62
7.4.210.0050.00916.60
7.4.200.0030.00316.42
7.4.130.0120.01116.51
7.4.120.0090.00916.41
7.4.110.0160.00716.54
7.4.100.0220.00416.65
7.4.90.0080.00816.29
7.4.80.0080.00816.66
7.4.70.0060.01116.59
7.4.60.0070.01016.70
7.4.50.0100.00616.46
7.4.40.0070.01116.66
7.4.30.0070.01016.48
7.4.20.0100.01316.57
7.4.10.0090.00616.36
7.4.00.0030.01316.50
7.3.330.0040.00416.40
7.3.320.0060.00013.14
7.3.310.0030.00316.25
7.3.300.0000.00616.39
7.3.290.0040.00916.33
7.3.260.0140.00316.58
7.3.230.0140.00316.38
7.3.220.0110.01116.40
7.3.210.0070.01016.40
7.3.200.0060.01016.46
7.3.190.0100.00616.36
7.3.180.0040.01216.48
7.3.170.0040.01216.46
7.3.160.0130.00316.48
7.3.150.0090.00916.38
7.3.140.0110.00716.43
7.3.130.0000.01716.29
7.3.120.0030.01216.47
7.3.110.0120.00616.29
7.3.100.0080.00816.37
7.3.90.0140.00316.50
7.3.80.0110.00616.47
7.3.70.0000.01716.30
7.3.60.0080.00916.31
7.3.50.0040.01216.40
7.3.40.0040.01216.50
7.3.30.0100.00716.33
7.3.20.0130.01316.48
7.3.10.0090.01516.42
7.3.00.0180.00016.58
7.2.340.0100.01316.65
7.2.330.0100.01016.44
7.2.320.0000.01916.64
7.2.310.0070.01016.49
7.2.300.0120.00616.46
7.2.290.0140.00416.82
7.2.280.0090.01216.67
7.2.270.0160.00316.55
7.2.260.0060.01016.65
7.2.250.0100.00716.61
7.2.240.0000.01716.69
7.2.230.0070.01116.40
7.2.220.0030.01316.77
7.2.210.0100.00716.64
7.2.200.0160.00916.58
7.2.190.0070.01016.58
7.2.180.0140.00316.50
7.2.170.0100.00716.58
7.2.160.0040.02216.62
7.2.150.0130.00716.67
7.2.140.0160.01316.56
7.2.130.0160.00316.63
7.2.120.0030.01316.49
7.2.110.0130.00316.52
7.2.100.0090.00916.63
7.2.90.0040.01416.59
7.2.80.0220.01516.54
7.2.70.0060.01216.43
7.2.60.0060.01116.63
7.2.50.0070.01916.66
7.2.40.0110.00716.70
7.2.30.0030.01416.56
7.2.20.0130.00716.54
7.2.10.0150.00616.56
7.2.00.0120.00616.47

preferences:
66.09 ms | 403 KiB | 5 Q