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(); } $o->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.0100.01016.63
8.3.50.0100.00921.99
8.3.40.0040.01118.96
8.3.30.0120.00418.73
8.3.20.0050.00320.34
8.3.10.0050.00323.52
8.3.00.0060.00319.38
8.2.180.0110.00716.75
8.2.170.0090.00622.96
8.2.160.0080.00622.12
8.2.150.0050.00324.18
8.2.140.0040.00424.66
8.2.130.0000.00917.75
8.2.120.0000.00726.35
8.2.110.0070.01022.20
8.2.100.0090.00317.91
8.2.90.0080.00019.13
8.2.80.0050.00317.97
8.2.70.0030.00517.63
8.2.60.0080.00017.79
8.2.50.0000.00818.07
8.2.40.0000.00919.46
8.2.30.0020.00520.54
8.2.20.0040.00417.82
8.2.10.0080.00018.01
8.2.00.0050.00217.92
8.1.280.0040.01125.92
8.1.270.0100.00021.96
8.1.260.0090.00028.09
8.1.250.0040.00428.09
8.1.240.0050.00522.61
8.1.230.0110.00017.65
8.1.220.0040.00417.74
8.1.210.0030.00518.77
8.1.200.0030.00617.35
8.1.190.0030.00517.35
8.1.180.0090.00018.10
8.1.170.0000.00818.48
8.1.160.0000.00722.04
8.1.150.0070.00018.82
8.1.140.0090.00019.51
8.1.130.0070.00017.72
8.1.120.0040.00417.41
8.1.110.0100.00017.51
8.1.100.0000.00817.51
8.1.90.0050.00217.43
8.1.80.0000.00917.47
8.1.70.0000.00717.40
8.1.60.0070.00317.61
8.1.50.0000.00817.54
8.1.40.0030.00517.53
8.1.30.0080.00017.54
8.1.20.0040.00417.68
8.1.10.0070.00017.61
8.1.00.0000.00817.59
8.0.300.0080.00018.77
8.0.290.0040.00416.75
8.0.280.0030.00318.50
8.0.270.0000.00817.23
8.0.260.0000.00817.34
8.0.250.0040.00417.02
8.0.240.0080.00017.01
8.0.230.0070.00017.05
8.0.220.0030.00317.01
8.0.210.0020.00516.95
8.0.200.0100.00016.92
8.0.190.0040.00417.05
8.0.180.0040.00417.01
8.0.170.0000.00816.88
8.0.160.0050.00317.04
8.0.150.0030.00316.79
8.0.140.0040.00716.77
8.0.130.0040.00413.48
8.0.120.0000.00716.90
8.0.110.0050.00316.86
8.0.100.0000.00816.91
8.0.90.0030.00316.92
8.0.80.0090.00917.01
8.0.70.0040.00416.96
8.0.60.0040.00417.01
8.0.50.0000.00716.82
8.0.30.0060.01217.10
8.0.20.0100.00717.41
8.0.10.0000.00716.95
8.0.00.0070.01016.69
7.4.330.0000.00516.85
7.4.320.0030.00316.54
7.4.300.0000.00616.52
7.4.290.0070.00016.61
7.4.280.0000.00816.52
7.4.270.0000.00716.60
7.4.260.0000.00716.52
7.4.250.0040.00416.53
7.4.240.0030.00416.56
7.4.230.0030.00316.48
7.4.220.0160.01016.46
7.4.210.0120.00916.61
7.4.200.0030.00416.64
7.4.160.0090.00616.30
7.4.150.0090.00917.40
7.4.140.0140.00517.86
7.4.130.0110.00716.43
7.4.120.0120.00816.47
7.4.110.0040.01416.59
7.4.100.0110.00716.56
7.4.90.0110.00516.59
7.4.80.0100.01019.39
7.4.70.0110.00716.51
7.4.60.0140.00716.63
7.4.50.0100.00316.58
7.4.40.0070.01016.46
7.4.30.0100.01016.62
7.4.00.0180.00015.06
7.3.330.0030.00313.45
7.3.320.0050.00013.39
7.3.310.0000.00816.48
7.3.300.0070.00016.48
7.3.290.0070.00916.35
7.3.280.0090.01016.39
7.3.270.0180.00017.40
7.3.260.0030.01316.54
7.3.250.0080.01016.51
7.3.240.0110.01016.48
7.3.230.0140.00316.42
7.3.210.0030.01316.45
7.3.200.0080.00916.61
7.3.190.0030.01316.42
7.3.180.0140.00716.59
7.3.170.0110.00516.46
7.3.160.0100.00716.39
7.3.120.0030.00714.87
7.3.110.0040.01114.70
7.3.100.0090.00614.71
7.3.90.0160.00014.64
7.3.80.0030.01014.70
7.3.70.0060.00614.95
7.3.60.0040.00714.63
7.3.50.0060.00914.76
7.3.40.0060.00914.58
7.3.30.0030.00914.84
7.3.20.0090.00616.83
7.3.10.0080.00416.82
7.3.00.0000.01616.78
7.2.330.0070.01116.78
7.2.320.0070.01116.62
7.2.310.0100.00616.67
7.2.300.0060.01116.78
7.2.290.0100.01616.60
7.2.240.0000.01515.16
7.2.230.0130.00315.24
7.2.220.0060.00314.99
7.2.210.0070.01014.84
7.2.200.0100.00315.06
7.2.190.0000.01315.17
7.2.180.0120.00615.13
7.2.170.0000.01414.82
7.2.160.0060.00915.07
7.2.150.0070.01016.80
7.2.140.0070.01116.84
7.2.130.0080.00517.18
7.2.120.0060.01216.85
7.2.110.0040.01116.98
7.2.100.0140.00416.93
7.2.90.0000.01417.11
7.2.80.0060.00616.79
7.2.70.0090.00616.81
7.2.60.0050.00816.94
7.2.50.0040.00817.05
7.2.40.0070.00716.96
7.2.30.0060.00616.93
7.2.20.0080.00816.94
7.2.10.0040.01116.91
7.2.00.0080.00618.34
7.1.330.0090.00615.84
7.1.320.0070.00715.79
7.1.310.0000.01315.86
7.1.300.0100.00715.91
7.1.290.0060.00715.46
7.1.280.0030.01115.79
7.1.270.0070.00315.49
7.1.260.0040.01215.63
7.1.250.0130.00315.45
7.1.200.0030.00615.68
7.1.100.0040.01117.94
7.1.70.0040.00817.22
7.1.60.0140.01119.48
7.1.50.0030.00916.89
7.1.00.0030.07722.32
7.0.200.0320.00714.29
7.0.60.0030.09020.05
7.0.50.0000.06017.91
7.0.40.0100.04020.23
7.0.30.0300.05020.25
7.0.20.0270.03720.05
7.0.10.0030.04320.12
7.0.00.0000.04320.32
5.6.280.0070.07021.05
5.6.210.0030.08320.55
5.6.200.0030.04018.19
5.6.190.0030.04720.61
5.6.180.0270.04020.63
5.6.170.0300.04720.54
5.6.160.0130.04020.70
5.6.150.0030.04318.29
5.6.140.0130.05318.28
5.6.130.0070.08018.25
5.6.120.0030.09021.00
5.6.110.0200.07720.98
5.6.100.0100.07721.00
5.6.90.0030.04021.11
5.6.80.0070.06320.49
5.5.350.3470.03720.53
5.5.340.0000.09018.07
5.5.330.0100.07020.25
5.5.320.0630.07020.36
5.5.310.0370.06720.30
5.5.300.0030.07717.98
5.5.290.0100.07317.95
5.5.280.0100.07720.95
5.5.270.0000.04720.76
5.5.260.0100.04720.90
5.5.250.0100.05020.62
5.5.240.0170.07020.14

preferences:
50.77 ms | 401 KiB | 5 Q