3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Z { public function __destruct() { throw new Exception('destruct Z'); } } class A { private $m; public function __construct() { $this->m = new Z(); } public function __destruct() { throw new Exception('destruct A'); } } class B { public function abc() { $a = new A(); } public function __destruct() { throw new Exception('destruct B'); } } try { try { $b = new B(); $b->abc(); unset($b); } catch (Exception $e) { echo $e->getMessage(); } catch (Exception $e) { echo $e->getMessage(); } ?>

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)
5.4.290.0140.12512.50
5.4.280.0190.08312.39
5.4.270.0080.04812.39
5.4.260.0130.07912.39
5.4.250.0420.13112.39
5.4.240.0280.10212.39
5.4.230.0220.11412.39
5.4.220.0150.06112.39
5.4.210.0150.08112.39
5.4.200.0100.05112.38
5.4.190.0150.05912.38
5.4.180.0060.04412.38
5.4.170.0210.07412.39
5.4.160.0120.04312.39
5.4.150.0150.05112.38
5.4.140.0090.05212.07
5.4.130.0170.06612.05
5.4.120.0090.03912.02
5.4.110.0050.04712.01
5.4.100.0110.04612.02
5.4.90.0200.09612.01
5.4.80.0170.12512.01
5.4.70.0200.07812.01
5.4.60.0070.04212.01
5.4.50.0070.03712.01
5.4.40.0100.06712.00
5.4.30.0140.07911.99
5.4.20.0140.07511.99
5.4.10.0200.06911.99
5.4.00.0150.08511.49
5.3.280.0100.04312.71
5.3.270.0130.07512.72
5.3.260.0200.13912.72
5.3.250.0270.11712.72
5.3.240.0220.12912.71
5.3.230.0130.05412.71
5.3.220.0160.05412.68
5.3.210.0100.06612.68
5.3.200.0110.03412.68
5.3.190.0120.06412.68
5.3.180.0130.05712.67
5.3.170.0120.04812.67
5.3.160.0100.03612.67
5.3.150.0190.04512.67
5.3.140.0110.07112.66
5.3.130.0100.04212.66
5.3.120.0170.04612.66
5.3.110.0120.05812.66
5.3.100.0130.04012.13
5.3.90.0120.03912.11
5.3.80.0150.03212.11
5.3.70.0120.06812.11
5.3.60.0080.04112.09
5.3.50.0110.03812.04
5.3.40.0090.05812.04
5.3.30.0150.06812.00
5.3.20.0080.05811.78
5.3.10.0080.06211.74
5.3.00.0160.07211.73
5.2.170.0100.0499.23
5.2.160.0120.0579.23
5.2.150.0220.0569.23
5.2.140.0080.0509.23
5.2.130.0070.0549.19
5.2.120.0200.0479.19
5.2.110.0060.0409.20
5.2.100.0180.0609.20
5.2.90.0270.1049.20
5.2.80.0220.0929.19
5.2.70.0130.0649.19
5.2.60.0170.0839.14
5.2.50.0190.0749.11
5.2.40.0190.0549.09
5.2.30.0100.0789.06
5.2.20.0140.0739.05
5.2.10.0220.0858.95
5.2.00.0140.0558.82
5.1.60.0110.0328.11
5.1.50.0060.0368.10
5.1.40.0080.0388.08
5.1.30.0170.0678.43
5.1.20.0180.0778.46
5.1.10.0160.0658.18
5.1.00.0120.0608.18
5.0.50.0090.0466.66
5.0.40.0090.0336.52
5.0.30.0060.0586.33
5.0.20.0080.0236.29
5.0.10.0050.0286.27
5.0.00.0150.0716.27
4.4.90.0140.0314.78
4.4.80.0070.0284.76
4.4.70.0060.0214.75
4.4.60.0050.0244.76
4.4.50.0050.0234.77
4.4.40.0030.0434.71
4.4.30.0060.0244.76
4.4.20.0030.0294.84
4.4.10.0040.0264.85
4.4.00.0060.0334.76
4.3.110.0060.0244.67
4.3.100.0070.0374.67
4.3.90.0100.0424.63
4.3.80.0060.0474.59
4.3.70.0040.0234.63
4.3.60.0060.0184.63
4.3.50.0030.0244.63
4.3.40.0070.0344.54
4.3.30.0030.0203.30
4.3.20.0030.0233.28
4.3.10.0050.0173.23
4.3.00.0130.01310.55

preferences:
138.51 ms | 1398 KiB | 7 Q