3v4l.org

run code in 300+ PHP versions simultaneously
<?php define('MAX_ATTEMPTS', 5); class NetworkException extends Exception { } class FetchDataException extends Exception { private $surpressed = []; public function addSuppressed(Throwable $e): void { $this->surpressed[] = $e; } public function getSuppressed(): array { return $this->surpressed; } } function fetchDataOverNetwork() { $networkExceptions = []; for ($i = 0; $i < MAX_ATTEMPTS; $i++) { try { // Some operation that may throw throw new NetworkException(); } catch (NetworkException $ne) { $networkExceptions[] = $ne; } } $fdException = new FetchDataException("Failed to get data"); foreach ($networkExceptions as $networkException) { $fdException->addSuppressed($networkException); } throw $fdException; } try { fetchDataOverNetwork(); } catch(FetchDataException $fde) { var_dump($fde->getSuppressed()); }

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.4.120.0100.00620.71
8.4.110.0110.01022.50
8.4.100.0150.00617.81
8.4.90.0140.00717.87
8.4.80.0070.00319.84
8.4.70.0120.00917.98
8.4.60.0120.00918.86
8.4.50.0050.00417.91
8.4.40.0120.00917.80
8.4.30.0090.00019.69
8.4.20.0120.00920.72
8.4.10.0130.00322.23
8.3.250.0120.00718.86
8.3.240.0150.00516.63
8.3.230.0100.00916.64
8.3.220.0080.00317.36
8.3.210.0130.00616.68
8.3.200.0040.00516.56
8.3.190.0110.00919.06
8.3.180.0150.00516.60
8.3.170.0130.00716.98
8.3.160.0100.01018.63
8.3.150.0060.00917.28
8.3.140.0090.00016.63
8.3.130.0090.00918.36
8.3.120.0060.01318.88
8.3.110.0090.00016.78
8.3.100.0100.00716.91
8.3.90.0000.01916.61
8.3.80.0000.00917.97
8.3.70.0040.01416.75
8.3.60.0190.00318.43
8.3.50.0060.00617.55
8.3.40.0150.00418.82
8.3.30.0070.01318.56
8.3.20.0060.00320.81
8.3.10.0070.00021.85
8.3.00.0080.00020.96
8.2.290.0130.00620.32
8.2.280.0070.00318.59
8.2.270.0160.00316.86
8.2.260.0080.00816.98
8.2.250.0040.00418.35
8.2.240.0170.00316.55
8.2.230.0030.00620.94
8.2.220.0100.01024.06
8.2.210.0060.00326.77
8.2.200.0060.00318.67
8.2.190.0070.01416.75
8.2.180.0110.00818.29
8.2.170.0150.00022.96
8.2.160.0120.00322.12
8.2.150.0050.00324.18
8.2.140.0090.00024.66
8.2.130.0080.00019.77
8.2.120.0080.00026.35
8.2.110.0070.00321.00
8.2.100.0090.01317.63
8.2.90.0000.00819.17
8.2.80.0000.00817.97
8.2.70.0040.00417.63
8.2.60.0040.00417.93
8.2.50.0030.00618.07
8.2.40.0080.00019.80
8.2.30.0080.00018.20
8.2.20.0000.00818.06
8.2.10.0000.00719.30
8.2.00.0040.00418.18
8.1.330.0120.00720.25
8.1.320.0090.01016.04
8.1.310.0000.00816.58
8.1.300.0200.00018.07
8.1.290.0060.00618.88
8.1.280.0120.00325.92
8.1.270.0080.00020.37
8.1.260.0060.00326.35
8.1.250.0030.00528.09
8.1.240.0090.00922.67
8.1.230.0040.00817.77
8.1.220.0040.00417.79
8.1.210.0080.00018.77
8.1.200.0050.00517.48
8.1.190.0000.00817.35
8.1.180.0030.00518.10
8.1.170.0000.00818.57
8.1.160.0030.00518.80
8.1.150.0000.00718.95
8.1.140.0080.00019.06
8.1.130.0000.00720.22
8.1.120.0040.00417.49
8.1.110.0030.00517.36
8.1.100.0000.00917.42
8.1.90.0000.00717.48
8.1.80.0000.00717.37
8.1.70.0030.00717.34
8.1.60.0000.00817.63
8.1.50.0060.00317.52
8.1.40.0030.00717.53
8.1.30.0040.00417.52
8.1.20.0040.00417.66
8.1.10.0040.00417.60
8.1.00.0000.00717.49
8.0.300.0000.00818.77
8.0.290.0040.00416.88
8.0.280.0040.00418.35
8.0.270.0000.00817.24
8.0.260.0000.00618.38
8.0.250.0070.00017.00
8.0.240.0030.00316.89
8.0.230.0050.00217.05
8.0.220.0030.00616.89
8.0.210.0000.00716.93
8.0.200.0060.00016.99
8.0.190.0050.00316.97
8.0.180.0090.00016.95
8.0.170.0030.00616.91
8.0.160.0040.00416.93
8.0.150.0000.00716.81
8.0.140.0050.00316.90
8.0.130.0030.00313.34
8.0.120.0040.00416.91
8.0.110.0050.00416.84
8.0.100.0000.00816.89
8.0.90.0030.00516.83
8.0.80.0080.01416.96
8.0.70.0070.00016.97
8.0.60.0030.00516.95
8.0.50.0040.00416.96
8.0.30.0120.00617.19
8.0.20.0110.01317.17
8.0.10.0070.00016.99
8.0.00.0120.01016.83
7.4.330.0030.00316.79
7.4.320.0030.00316.49
7.4.300.0070.00016.45
7.4.290.0030.00316.52
7.4.280.0000.00716.54
7.4.270.0000.00916.61
7.4.260.0040.00416.39
7.4.250.0040.00416.56
7.4.240.0040.00416.58
7.4.230.0040.00416.71
7.4.220.0040.00416.57
7.4.210.0050.01316.49
7.4.200.0040.00416.41
7.4.160.0090.00916.48
7.4.140.0070.01417.86
7.4.130.0060.01216.51
7.4.120.0110.00916.45
7.4.110.0060.01316.52
7.4.100.0220.00316.47
7.4.90.0110.00716.44
7.4.80.0150.00919.39
7.4.70.0150.00316.63
7.4.60.0130.00316.50
7.4.50.0060.00916.53
7.4.40.0110.00716.34
7.4.10.0090.00914.91
7.4.00.0020.01414.97
7.3.330.0050.00013.41
7.3.320.0030.00313.24
7.3.310.0050.00316.41
7.3.300.0040.00416.31
7.3.290.0060.01016.32
7.3.280.0070.01116.36
7.3.260.0120.00816.52
7.3.240.0130.00816.47
7.3.230.0150.00616.46
7.3.210.0140.00716.39
7.3.200.0150.00416.47
7.3.190.0150.00916.52
7.3.180.0180.00316.66
7.3.170.0170.00016.51
7.3.160.0090.01216.47
7.3.130.0030.01215.10
7.3.120.0060.01114.74
7.3.110.0140.00514.68
7.3.100.0100.00514.71
7.3.90.0060.00814.75
7.3.80.0080.00914.80
7.3.70.0070.00814.79
7.3.60.0070.00414.75
7.3.50.0110.00414.66
7.3.40.0040.00614.83
7.3.30.0060.00814.77
7.3.20.0060.00816.66
7.3.10.0050.00916.58
7.3.00.0080.00916.60
7.2.330.0110.00716.55
7.2.320.0220.00016.50
7.2.310.0150.00816.85
7.2.300.0090.01516.88
7.2.290.0160.00516.47
7.2.260.0070.01015.16
7.2.250.0110.00715.02
7.2.240.0090.01014.97
7.2.230.0100.00615.02
7.2.220.0060.00914.99
7.2.210.0070.00815.03
7.2.200.0050.00915.03
7.2.190.0090.00815.08
7.2.180.0110.00314.99
7.2.170.0050.00815.11
7.2.160.0040.00814.93
7.2.150.0090.00816.93
7.2.140.0070.00716.85
7.2.130.0100.00416.80
7.2.120.0060.00516.97
7.2.110.0080.00316.87
7.2.100.0080.00716.80
7.2.90.0080.00516.89
7.2.80.0060.00616.99
7.2.70.0030.01216.89
7.2.60.0100.00616.94
7.2.50.0060.01116.94
7.2.40.0090.00816.98
7.2.30.0080.00616.91
7.2.20.0060.00716.85
7.2.10.0060.00816.94
7.2.00.0080.00716.93
7.1.330.0020.01215.83
7.1.320.0060.00715.80
7.1.310.0070.00615.75
7.1.300.0040.00915.68
7.1.290.0090.00515.72
7.1.280.0070.01015.66
7.1.270.0050.00815.73
7.1.260.0050.01015.64
7.1.250.0050.00815.68
7.1.240.0040.01115.77
7.1.230.0040.01415.83
7.1.220.0000.01415.66
7.1.210.0000.01415.64
7.1.200.0030.01015.75
7.1.190.0000.01415.85
7.1.180.0040.00415.43
7.1.170.0070.00715.75
7.1.160.0110.00715.59
7.1.150.0030.00715.90
7.1.140.0060.00315.60
7.1.130.0070.00715.84
7.1.120.0000.01415.57
7.1.110.0100.00615.89
7.1.100.0060.01015.70
7.1.90.0030.01315.75
7.1.80.0060.00615.50
7.1.70.0000.01215.73
7.1.60.0040.01015.64
7.1.50.0030.00915.87
7.1.40.0100.00315.79
7.1.30.0040.01115.82
7.1.20.0060.00915.82
7.1.10.0090.00315.76
7.1.00.0030.01015.60

preferences:
115.83 ms | 403 KiB | 5 Q