3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Test { public $name; public $action; public function __construct($name){ $this->name = $name; } public function action($action){ $this->action = $action; throw new Exception('destroyer ?'); } public function __destruct(){ echo "i'm dying".$this->name." ".$this->action; } } $o = new Test('o'); $p = new Test('p'); try { $o->action('first'); } catch(Exception $ex){ echo $ex->getMessage(); } $p->action('second');

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.0110.00716.88
8.3.50.0070.00718.05
8.3.40.0110.00419.00
8.3.30.0150.00618.80
8.3.20.0060.00320.30
8.3.10.0000.00823.53
8.3.00.0000.00819.38
8.2.180.0090.00916.75
8.2.170.0060.00922.96
8.2.160.0100.00322.08
8.2.150.0000.00824.18
8.2.140.0040.00424.66
8.2.130.0030.00619.25
8.2.120.0040.00426.35
8.2.110.0030.00619.20
8.2.100.0070.00417.93
8.2.90.0080.00019.07
8.2.80.0050.00317.97
8.2.70.0050.00517.63
8.2.60.0040.00417.93
8.2.50.0050.00318.07
8.2.40.0030.00519.31
8.2.30.0040.00420.70
8.2.20.0080.00017.66
8.2.10.0040.00417.94
8.2.00.0000.00818.07
8.1.280.0110.00425.92
8.1.270.0030.00721.98
8.1.260.0000.00828.09
8.1.250.0040.00428.09
8.1.240.0060.00322.46
8.1.230.0110.00017.66
8.1.220.0080.00017.74
8.1.210.0000.00818.77
8.1.200.0030.00617.35
8.1.190.0040.00417.35
8.1.180.0000.00818.10
8.1.170.0040.00418.71
8.1.160.0000.00722.03
8.1.150.0040.00418.91
8.1.140.0020.00519.64
8.1.130.0040.00417.63
8.1.120.0000.00717.52
8.1.110.0030.00617.50
8.1.100.0000.00817.38
8.1.90.0050.00217.46
8.1.80.0000.00717.46
8.1.70.0040.00417.34
8.1.60.0000.00817.64
8.1.50.0030.00617.54
8.1.40.0040.00417.58
8.1.30.0030.00617.57
8.1.20.0050.00317.70
8.1.10.0040.00417.48
8.1.00.0040.00417.52
8.0.300.0080.00018.77
8.0.290.0050.00316.75
8.0.280.0030.00318.45
8.0.270.0030.00317.18
8.0.260.0000.00717.26
8.0.250.0040.00417.07
8.0.240.0000.00816.89
8.0.230.0070.00016.96
8.0.220.0030.00316.93
8.0.210.0040.00416.93
8.0.200.0070.00216.94
8.0.190.0000.00716.93
8.0.180.0050.00216.88
8.0.170.0050.00317.00
8.0.160.0040.00416.95
8.0.150.0000.00816.95
8.0.140.0070.00316.81
8.0.130.0040.00413.44
8.0.120.0040.00416.93
8.0.110.0040.00416.90
8.0.100.0040.00416.84
8.0.90.0070.00016.86
8.0.80.0030.01416.92
8.0.70.0000.00716.75
8.0.60.0040.00416.96
8.0.50.0000.00716.80
8.0.30.0100.00617.08
8.0.20.0110.01017.40
8.0.10.0080.00017.13
8.0.00.0060.01216.78
7.4.330.0020.00216.78
7.4.320.0030.00316.47
7.4.300.0030.00316.54
7.4.290.0050.00216.58
7.4.280.0050.00316.65
7.4.270.0070.00016.63
7.4.260.0000.00716.52
7.4.250.0070.00016.38
7.4.240.0000.00716.59
7.4.230.0070.00016.46
7.4.220.0060.01916.44
7.4.210.0050.01016.56
7.4.200.0000.00716.68
7.4.160.0080.00816.48
7.4.150.0040.01417.40
7.4.140.0100.00817.86
7.4.130.0140.00316.57
7.4.120.0080.01016.54
7.4.110.0150.00616.44
7.4.100.0030.01316.39
7.4.90.0130.00916.54
7.4.80.0100.00719.39
7.4.70.0080.01216.60
7.4.60.0060.01016.70
7.4.50.0060.00616.32
7.4.40.0150.00416.52
7.4.30.0040.01816.48
7.4.00.0000.01414.88
7.3.330.0000.00613.11
7.3.320.0000.00513.16
7.3.310.0030.00316.27
7.3.300.0030.00316.36
7.3.290.0080.01016.34
7.3.280.0120.00716.35
7.3.270.0100.00717.40
7.3.260.0130.00616.50
7.3.250.0120.00616.42
7.3.240.0110.00916.46
7.3.230.0160.00516.39
7.3.210.0060.01216.61
7.3.200.0160.00016.24
7.3.190.0060.01616.43
7.3.180.0140.00716.50
7.3.170.0140.00316.44
7.3.160.0070.01016.51
7.3.120.0080.00814.70
7.3.110.0030.01414.98
7.3.100.0070.00714.98
7.3.90.0070.00714.61
7.3.80.0070.00714.84
7.3.70.0060.00814.92
7.3.60.0030.01214.88
7.3.50.0000.01715.04
7.3.40.0060.00914.84
7.3.30.0070.00714.53
7.3.20.0040.00816.66
7.3.10.0070.01016.46
7.3.00.0040.00916.76
7.2.330.0180.00016.48
7.2.320.0070.01616.54
7.2.310.0100.00716.66
7.2.300.0030.01416.80
7.2.290.0130.01216.79
7.2.240.0040.01414.82
7.2.230.0060.00914.96
7.2.220.0060.00915.36
7.2.210.0040.00815.22
7.2.200.0100.00714.80
7.2.190.0070.00414.97
7.2.180.0030.00715.14
7.2.170.0070.00715.19
7.2.160.0070.01015.14
7.2.150.0070.01117.07
7.2.140.0030.01016.92
7.2.130.0070.01116.74
7.2.120.0060.01217.02
7.2.110.0070.00717.02
7.2.100.0070.01016.90
7.2.90.0120.00416.74
7.2.80.0030.01316.97
7.2.70.0030.01416.95
7.2.60.0170.00516.70
7.2.50.0000.01216.80
7.2.40.0070.01016.86
7.2.30.0030.01517.01
7.2.20.0030.00916.98
7.2.10.0030.01317.07
7.2.00.0100.00918.11
7.1.330.0030.00715.61
7.1.320.0070.00315.66
7.1.310.0170.00015.67
7.1.300.0060.00915.44
7.1.290.0060.00915.59
7.1.280.0030.01315.79
7.1.270.0090.00615.76
7.1.260.0070.00715.75
7.1.250.0040.01115.66
7.1.200.0050.00515.54
7.1.100.0080.00317.86
7.1.70.0000.00917.04
7.1.60.0070.01719.48
7.1.50.0070.01416.87
7.1.00.0070.07322.31
7.0.200.0350.00314.44
7.0.60.0070.07019.96
7.0.50.0130.06717.89
7.0.40.0230.06719.96
7.0.30.0430.05020.17
7.0.20.0300.08020.08
7.0.10.0030.04720.30
7.0.00.0000.04320.33
5.6.280.0030.05721.13
5.6.210.0030.06720.74
5.6.200.0000.04318.27
5.6.190.0030.04320.33
5.6.180.0300.07320.48
5.6.170.0230.05720.56
5.6.160.0070.04020.39
5.6.150.0100.08018.14
5.6.140.0070.08318.15
5.6.130.0100.08018.14
5.6.120.0100.07721.03
5.6.110.0230.06721.01
5.6.100.0100.07721.11
5.6.90.0100.03721.04
5.6.80.0030.06020.41
5.5.350.3300.03320.41
5.5.340.0030.05017.96
5.5.330.0070.08020.27
5.5.320.0370.07320.30
5.5.310.0300.06320.24
5.5.300.0070.05718.01
5.5.290.0030.04318.07
5.5.280.0200.07320.77
5.5.270.0030.04720.75
5.5.260.0130.07720.65
5.5.250.0070.07720.46
5.5.240.0170.03320.26

preferences:
58.87 ms | 400 KiB | 5 Q