3v4l.org

run code in 300+ PHP versions simultaneously
<?php class ClassName { public function __construct() { echo 'object begin' . PHP_EOL; throw new Exception('!! Exception !!'); echo 'object after thow' . PHP_EOL; } public function __destruct() { echo 'object end' . PHP_EOL; } } echo '<< script begin >>' . PHP_EOL; try { $o = new ClassName; } catch (Exception $e) { echo $e->getMessage() . PHP_EOL; } finally { echo 'finally block, object ' . (isset($o) ? 'exist' :'not exist') . PHP_EOL; } echo '<< script end >>' . PHP_EOL;

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.0040.01118.55
8.3.50.0110.00418.18
8.3.40.0070.00718.80
8.3.30.0160.00018.79
8.3.20.0020.00521.76
8.3.10.0090.00023.59
8.3.00.0030.00519.79
8.2.180.0140.00718.42
8.2.170.0120.00322.96
8.2.160.0100.00320.52
8.2.150.0040.00424.18
8.2.140.0000.00824.66
8.2.130.0030.00520.42
8.2.120.0040.00426.35
8.2.110.0060.00320.47
8.2.100.0000.01217.97
8.2.90.0000.00819.17
8.2.80.0000.00818.05
8.2.70.0040.00417.63
8.2.60.0030.00517.80
8.2.50.0030.00518.10
8.2.40.0000.00820.59
8.2.30.0080.00019.30
8.2.20.0000.00718.12
8.2.10.0050.00218.01
8.2.00.0000.00717.93
8.1.280.0070.01125.92
8.1.270.0030.00520.65
8.1.260.0000.00726.35
8.1.250.0040.00428.09
8.1.240.0030.00623.88
8.1.230.0040.00817.77
8.1.220.0060.00317.74
8.1.210.0000.00918.77
8.1.200.0090.00017.48
8.1.190.0000.00817.35
8.1.180.0030.00518.10
8.1.170.0040.00418.54
8.1.160.0080.00018.94
8.1.150.0000.00718.80
8.1.140.0000.00719.57
8.1.130.0040.00418.88
8.1.120.0030.00317.46
8.1.110.0050.00217.44
8.1.100.0080.00017.41
8.1.90.0040.00417.37
8.1.80.0050.00317.46
8.1.70.0000.00817.49
8.1.60.0000.00717.47
8.1.50.0080.00017.42
8.1.40.0050.00317.51
8.1.30.0040.00417.67
8.1.20.0000.00817.70
8.1.10.0040.00417.58
8.1.00.0030.00517.52
8.0.300.0040.00419.93
8.0.290.0000.00816.75
8.0.280.0030.00318.32
8.0.270.0070.00017.30
8.0.260.0000.00718.96
8.0.250.0000.00617.03
8.0.240.0030.00316.91
8.0.230.0000.00716.98
8.0.220.0000.00816.93
8.0.210.0000.00716.85
8.0.200.0070.00016.90
8.0.190.0040.00416.98
8.0.180.0080.00016.91
8.0.170.0050.00516.95
8.0.160.0000.00716.93
8.0.150.0000.00816.95
8.0.140.0000.00716.91
8.0.130.0000.00713.35
8.0.120.0020.00516.84
8.0.110.0040.00417.06
8.0.100.0000.00816.98
8.0.90.0050.00216.96
8.0.80.0080.00916.89
8.0.70.0030.00416.93
8.0.60.0000.00816.91
8.0.50.0040.00416.86
8.0.30.0090.01016.97
8.0.20.0090.00917.40
8.0.10.0000.00716.96
8.0.00.0120.00617.04
7.4.330.0000.00615.55
7.4.320.0000.00616.59
7.4.300.0060.00016.50
7.4.290.0060.00316.52
7.4.280.0110.00016.50
7.4.270.0000.00816.55
7.4.260.0000.00716.50
7.4.250.0040.00416.61
7.4.240.0030.00616.49
7.4.230.0040.00416.60
7.4.220.0130.01616.65
7.4.210.0090.00616.70
7.4.200.0040.00416.69
7.4.160.0110.00516.42
7.4.150.0100.01017.40
7.4.140.0100.01117.86
7.4.130.0030.01516.61
7.4.120.0100.01016.47
7.4.110.0080.01116.51
7.4.100.0120.00616.45
7.4.90.0030.01316.59
7.4.80.0150.00419.39
7.4.70.0060.01216.63
7.4.60.0120.00916.35
7.4.50.0040.01116.52
7.4.40.0100.00716.28
7.4.30.0100.00616.58
7.4.00.0070.01114.84
7.3.330.0000.00513.22
7.3.320.0000.00513.36
7.3.310.0030.00316.21
7.3.300.0000.00616.41
7.3.290.0090.00616.36
7.3.280.0080.00916.37
7.3.270.0180.00017.40
7.3.260.0100.00716.53
7.3.250.0130.00616.41
7.3.240.0130.00816.51
7.3.230.0060.01516.46
7.3.210.0070.01016.38
7.3.200.0060.01216.32
7.3.190.0130.00316.33
7.3.180.0150.00316.54
7.3.170.0070.01316.53
7.3.160.0130.00616.49
7.3.120.0140.00314.60
7.3.110.0110.00715.00
7.3.100.0060.00914.79
7.3.90.0090.00614.93
7.3.80.0070.00714.87
7.3.70.0110.00614.90
7.3.60.0040.01214.86
7.3.50.0000.01514.64
7.3.40.0070.00714.67
7.3.30.0040.01414.82
7.3.20.0070.01116.80
7.3.10.0060.00616.61
7.3.00.0160.00016.66
7.2.330.0170.00016.46
7.2.320.0070.01016.66
7.2.310.0120.01316.66
7.2.300.0050.02016.35
7.2.290.0060.01616.63
7.2.250.0120.00714.89
7.2.240.0040.01414.63
7.2.230.0090.00915.02
7.2.220.0090.00415.31
7.2.210.0000.01215.01
7.2.200.0030.01314.98
7.2.190.0130.00315.13
7.2.180.0060.00915.09
7.2.170.0100.00314.95
7.2.60.0060.00916.80
7.2.00.0060.00619.35
7.1.330.0100.00615.80
7.1.320.0080.00015.93
7.1.310.0030.01015.91
7.1.300.0090.00615.71
7.1.290.0100.00715.85
7.1.280.0040.00815.54
7.1.270.0090.00315.63
7.1.260.0040.00815.90
7.1.200.0040.00415.73
7.1.100.0030.00617.93
7.1.70.0040.00417.11
7.1.60.1300.00733.16
7.1.50.0300.01732.81
7.1.40.0930.00332.29
7.1.30.0800.01032.49
7.1.20.0200.01032.53
7.1.10.0700.01314.46
7.1.00.1070.01314.72
7.0.200.0770.01314.88
7.0.190.0030.00714.85
7.0.180.0600.00714.48
7.0.170.0030.01314.50
7.0.160.0600.00314.44
7.0.150.0800.00714.22
7.0.140.0600.01714.41
7.0.130.0530.01314.62
7.0.120.0470.00714.77
7.0.110.0470.01014.42
7.0.100.0470.01014.35
7.0.90.0500.01014.14
7.0.80.0800.01014.60
7.0.70.0700.01314.32
7.0.60.0030.01314.30
7.0.50.0670.01314.35
7.0.40.0430.01014.52
7.0.30.0630.01314.44
7.0.20.0700.01014.65
7.0.10.0700.01314.52
7.0.00.0470.00714.63

preferences:
64.43 ms | 401 KiB | 5 Q