3v4l.org

run code in 300+ PHP versions simultaneously
<?php namespace TestExample; class Obj1 { public function doObj1() {} } class Obj2 { public function doObj2Something() { throw new \RuntimeException('hi'); } public function doObj2SomethingElse() {} } class MainObj { private $obj1, $obj2; public function __construct(Obj1 $obj1, Obj2 $obj2) { $this->obj1 = $obj1; $this->obj2 = $obj2; } public function process() { $this->obj1->doObj1(); try { $this->obj2->doObj2Something(); } catch (\RuntimeException $e) { throw $e; } finally { $this->obj2->doObj2SomethingElse(); } } } try { $processor = new MainObj(new Obj1, new Obj2); $processor->process(); } catch (\RuntimeException $e) { var_dump($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)
8.3.60.0140.00716.88
8.3.50.0090.00921.98
8.3.40.0080.00818.79
8.3.30.0110.00318.95
8.3.20.0040.00420.35
8.3.10.0080.00023.70
8.3.00.0000.00819.24
8.2.180.0120.00318.53
8.2.170.0000.01522.96
8.2.160.0160.00320.41
8.2.150.0140.00424.18
8.2.140.0000.00824.66
8.2.130.0080.00026.16
8.2.120.0090.00022.31
8.2.110.0030.00622.27
8.2.100.0040.00817.84
8.2.90.0000.00819.26
8.2.80.0000.00818.03
8.2.70.0000.00817.46
8.2.60.0030.00617.80
8.2.50.0040.00418.07
8.2.40.0040.00418.09
8.2.30.0040.00418.01
8.2.20.0050.00217.60
8.2.10.0080.00018.14
8.2.00.0070.00317.82
8.1.280.0120.00325.92
8.1.270.0080.00023.80
8.1.260.0070.00026.35
8.1.250.0080.00028.09
8.1.240.0060.00324.01
8.1.230.0030.00719.08
8.1.220.0030.00617.74
8.1.210.0080.00018.77
8.1.200.0030.00617.35
8.1.190.0040.00417.52
8.1.180.0000.00818.10
8.1.170.0060.00318.58
8.1.160.0000.00721.97
8.1.150.0040.00418.64
8.1.140.0080.00017.46
8.1.130.0050.00217.76
8.1.120.0000.00717.55
8.1.110.0000.00717.39
8.1.100.0050.00217.48
8.1.90.0080.00017.51
8.1.80.0060.00317.47
8.1.70.0070.00017.37
8.1.60.0000.00817.62
8.1.50.0000.00817.43
8.1.40.0030.00517.52
8.1.30.0030.00517.49
8.1.20.0040.00417.63
8.1.10.0040.00417.48
8.1.00.0030.00517.46
8.0.300.0080.00018.77
8.0.290.0000.00717.04
8.0.280.0030.00518.39
8.0.270.0000.00717.21
8.0.260.0030.00317.21
8.0.250.0050.00216.98
8.0.240.0040.00416.96
8.0.230.0000.00716.98
8.0.220.0070.00016.87
8.0.210.0000.00716.92
8.0.200.0030.00316.99
8.0.190.0030.00516.95
8.0.180.0080.00016.95
8.0.170.0000.00816.88
8.0.160.0080.00016.97
8.0.150.0070.00016.94
8.0.140.0040.00416.91
8.0.130.0000.00613.41
8.0.120.0030.00616.77
8.0.110.0040.00416.95
8.0.100.0000.00816.80
8.0.90.0030.00517.07
8.0.80.0080.00816.93
8.0.70.0000.00716.84
8.0.60.0070.00016.99
8.0.50.0040.00416.77
8.0.30.0140.00517.14
8.0.20.0110.00817.40
8.0.10.0040.00417.07
8.0.00.0090.01116.90
7.4.330.0000.00615.00
7.4.320.0030.00316.54
7.4.300.0060.00016.67
7.4.290.0000.00816.62
7.4.280.0030.00316.61
7.4.270.0000.00816.52
7.4.260.0000.00716.65
7.4.250.0000.00816.48
7.4.240.0000.00716.61
7.4.230.0000.00716.62
7.4.220.0070.01116.58
7.4.210.0100.00816.59
7.4.200.0030.00316.32
7.4.190.0050.00216.77
7.4.160.0030.01316.68
7.4.150.0070.01017.40
7.4.140.0100.00717.86
7.4.130.0060.01216.51
7.4.120.0100.00716.56
7.4.110.0070.01416.52
7.4.100.0140.00316.68
7.4.90.0120.00616.62
7.4.80.0090.00919.39
7.4.70.0100.00716.50
7.4.60.0090.00616.70
7.4.50.0060.00316.44
7.4.40.0030.01022.77
7.4.30.0080.00816.36
7.4.00.0080.00815.06
7.3.330.0070.00013.32
7.3.320.0000.00613.46
7.3.310.0000.00716.41
7.3.300.0000.00716.40
7.3.290.0120.00316.34
7.3.280.0050.01216.40
7.3.270.0070.01017.40
7.3.260.0140.00716.41
7.3.250.0090.00816.51
7.3.240.0100.01016.44
7.3.230.0160.00916.48
7.3.210.0100.00716.52
7.3.200.0060.01619.39
7.3.190.0060.01616.46
7.3.180.0070.01016.48
7.3.170.0050.01116.41
7.3.160.0100.00716.59
7.3.120.0060.01014.73
7.3.110.0060.00914.90
7.3.100.0100.00314.96
7.3.90.0070.00714.83
7.3.80.0030.01214.85
7.3.70.0060.00314.81
7.3.60.0000.00814.59
7.3.50.0100.00714.84
7.3.40.0060.01214.64
7.3.30.0000.01514.96
7.3.20.0100.00316.64
7.3.10.0030.01216.37
7.3.00.0070.00716.61
7.2.330.0100.00716.47
7.2.320.0060.01216.43
7.2.310.0070.01016.47
7.2.300.0000.01616.55
7.2.290.0080.00816.58
7.2.250.0090.00615.15
7.2.240.0140.00714.93
7.2.230.0040.00815.23
7.2.220.0040.00815.15
7.2.210.0090.00614.72
7.2.200.0060.00614.76
7.2.190.0070.00714.96
7.2.180.0060.01314.59
7.2.170.0080.00614.86
7.2.00.0080.00319.35
7.1.330.0100.00615.68
7.1.320.0030.01415.50
7.1.310.0090.00615.62
7.1.300.0060.00915.67
7.1.290.0070.01015.25
7.1.280.0060.00615.76
7.1.270.0030.01015.46
7.1.260.0030.00615.52
7.1.100.0000.00917.95
7.1.70.0000.01516.66
7.1.60.0090.01619.33
7.1.50.0090.01216.89
7.1.00.0100.07022.36
7.0.200.0000.00716.89
7.0.140.0070.07022.00
7.0.60.0130.08019.95
7.0.50.0100.07717.96
7.0.40.0100.08719.96
7.0.30.0500.07320.23
7.0.20.0230.08720.23
7.0.10.0030.04320.22
7.0.00.0070.04020.15
5.6.280.0100.06721.13
5.6.210.0030.04720.72
5.6.200.0030.07018.21
5.6.190.0030.05020.60
5.6.180.0230.05020.45
5.6.170.0300.07320.44
5.6.160.0030.06720.70
5.6.150.0130.08018.27
5.6.140.0100.03718.18
5.6.130.0030.04018.14
5.6.120.0130.07720.90
5.6.110.0030.07721.00
5.6.100.0000.06721.01
5.6.90.0030.05721.13
5.6.80.0030.03720.43
5.6.70.4670.03720.39
5.5.350.0200.07720.41
5.5.340.0070.08018.05
5.5.330.0100.07720.45
5.5.320.0070.07720.32
5.5.310.0330.07320.30
5.5.300.0100.04717.98
5.5.290.0000.04317.95
5.5.280.0170.08020.90
5.5.270.0100.08020.85
5.5.260.0130.06320.98
5.5.250.0130.07720.57
5.5.240.0270.07320.17
5.4.450.0900.06319.63
5.4.440.0870.05719.69
5.4.430.0230.06319.16
5.4.420.0230.07019.46
5.4.410.0830.06719.57
5.4.400.0870.05018.88
5.4.390.0730.06019.29
5.4.380.0270.06318.75
5.4.370.0170.05718.76
5.4.360.0270.05318.77
5.4.350.0230.08318.59
5.4.340.0330.05318.77
5.4.320.0080.04112.53
5.4.310.0100.03712.53
5.4.300.0080.04412.54
5.4.290.0100.03312.52
5.4.280.0100.04912.40
5.4.270.0070.04212.41
5.4.260.0100.06612.41
5.4.250.0150.07812.41
5.4.240.0130.05412.41
5.4.230.0100.06412.40
5.4.220.0110.06212.39
5.4.210.0130.05312.40
5.4.200.0130.05912.39
5.4.190.0130.05912.39
5.4.180.0130.05712.39
5.4.170.0140.05412.40
5.4.160.0090.04612.39
5.4.150.0090.04312.39
5.4.140.0120.04712.09
5.4.130.0110.04212.07
5.4.120.0200.08112.04
5.4.110.0180.06212.02
5.4.100.0420.09312.03
5.4.90.0130.07512.03
5.4.80.0270.11512.02
5.4.70.0080.03512.02
5.4.60.0090.03612.02
5.4.50.0070.03812.03
5.4.40.0080.03812.01
5.4.30.0080.04312.01
5.4.20.0060.04112.00
5.4.10.0080.03712.01
5.4.00.0030.04211.50
5.3.290.0090.04512.80
5.3.280.0070.04212.71
5.3.270.0110.05212.72
5.3.260.0080.04612.72
5.3.250.0110.04312.72
5.3.240.0080.05612.72
5.3.230.0090.05312.71
5.3.220.0090.04712.68
5.3.210.0100.04412.68
5.3.200.0090.03812.68
5.3.190.0070.04212.68
5.3.180.0100.03712.67
5.3.170.0090.04112.67
5.3.160.0090.03912.67
5.3.150.0050.06212.67
5.3.140.0090.05312.66
5.3.130.0070.04212.66
5.3.120.0120.05612.66
5.3.110.0120.05012.65
5.3.100.0090.05012.12
5.3.90.0070.04612.10
5.3.80.0120.03412.08
5.3.70.0050.04412.08
5.3.60.0150.05012.07
5.3.50.0050.03912.02
5.3.40.0070.03812.02
5.3.30.0090.03811.97
5.3.20.0110.04711.76
5.3.10.0080.04511.73
5.3.00.0080.04911.71
5.2.170.0090.0319.15
5.2.160.0110.0319.15
5.2.150.0060.0369.15
5.2.140.0100.0409.14
5.2.130.0080.0399.11
5.2.120.0080.0399.11
5.2.110.0120.0379.11
5.2.100.0060.0329.11
5.2.90.0060.0429.11
5.2.80.0080.0419.11
5.2.70.0070.0439.11
5.2.60.0070.0439.06
5.2.50.0100.0429.03
5.2.40.0060.0419.00
5.2.30.0070.0448.99
5.2.20.0080.0408.98
5.2.10.0110.0378.90
5.2.00.0050.0428.76
5.1.60.0110.0288.04
5.1.50.0070.0358.05
5.1.40.0050.0318.03
5.1.30.0100.0348.38
5.1.20.0080.0398.40
5.1.10.0090.0348.13
5.1.00.0090.0388.13
5.0.50.0060.0296.60
5.0.40.0140.0366.46
5.0.30.0100.0376.27
5.0.20.0060.0246.25
5.0.10.0040.0236.23
5.0.00.0040.0406.21
4.4.90.0080.0184.78
4.4.80.0040.0154.76
4.4.70.0040.0164.76
4.4.60.0030.0164.75
4.4.50.0040.0154.77
4.4.40.0020.0314.71
4.4.30.0030.0164.76
4.4.20.0020.0174.84
4.4.10.0050.0154.85
4.4.00.0030.0264.76
4.3.110.0020.0184.67
4.3.100.0020.0184.66
4.3.90.0030.0164.63
4.3.80.0020.0274.58
4.3.70.0120.0224.63
4.3.60.0040.0374.63
4.3.50.0260.0604.62
4.3.40.0060.0344.53
4.3.30.0050.0293.27
4.3.20.0020.0243.25
4.3.10.0180.0863.21
4.3.00.0130.01710.37

preferences:
50.68 ms | 401 KiB | 5 Q