3v4l.org

run code in 300+ PHP versions simultaneously
<?php trait ExceptionFixer { public static function throw(self $exception): self { $exception->file = $exception->getTrace()[0]['file']; $exception->line = $exception->getTrace()[0]['line']; return $exception; } } class MyException extends Exception { use ExceptionFixer; public static function create(): self { $self = new MyException('Custom exception'); return self::throw($self); } } try { throw MyException::create(); } catch (Exception $exception) { echo $exception->getLine() . 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.0120.00916.75
8.3.50.0080.00818.18
8.3.40.0140.00018.93
8.3.30.0060.00918.92
8.3.20.0080.00024.18
8.3.10.0050.00324.66
8.3.00.0040.00426.16
8.2.180.0110.01125.92
8.2.170.0040.01119.04
8.2.160.0130.00022.96
8.2.150.0050.00325.66
8.2.140.0080.00024.66
8.2.130.0070.00026.16
8.2.120.0040.00421.04
8.2.110.0060.00322.31
8.2.100.0060.00619.63
8.2.90.0060.00317.88
8.2.80.0040.00418.90
8.2.70.0080.00017.75
8.2.60.0030.00517.75
8.2.50.0030.00718.05
8.2.40.0060.00318.28
8.2.30.0040.00418.14
8.2.20.0000.00717.99
8.2.10.0000.00719.32
8.2.00.0000.00819.24
8.1.280.0070.01025.92
8.1.270.0090.00023.99
8.1.260.0000.00826.35
8.1.250.0040.00428.09
8.1.240.0030.00722.16
8.1.230.0110.00017.89
8.1.220.0050.00317.78
8.1.210.0080.00018.77
8.1.200.0040.00417.35
8.1.190.0090.00017.35
8.1.180.0060.00318.10
8.1.170.0050.00318.63
8.1.160.0000.00718.90
8.1.150.0070.00018.80
8.1.140.0000.00818.91
8.1.130.0050.00520.05
8.1.120.0000.00717.54
8.1.110.0030.00517.33
8.1.100.0030.00617.47
8.1.90.0050.00517.29
8.1.80.0070.00317.45
8.1.70.0030.00317.46
8.1.60.0000.00817.42
8.1.50.0030.00617.56
8.1.40.0030.00517.45
8.1.30.0030.00517.48
8.1.20.0060.00317.50
8.1.10.0050.00517.48
8.1.00.0070.00317.53
8.0.300.0030.00620.67
8.0.290.0000.00916.75
8.0.280.0030.00318.36
8.0.270.0030.00317.98
8.0.260.0000.00818.33
8.0.250.0040.00417.05
8.0.240.0030.00316.94
8.0.230.0030.00316.93
8.0.220.0000.00716.85
8.0.210.0000.00816.83
8.0.200.0070.00016.98
8.0.190.0000.00816.89
8.0.180.0030.00517.00
8.0.170.0090.00016.81
8.0.160.0040.00416.95
8.0.150.0040.00416.82
8.0.140.0000.00816.95
8.0.130.0030.00313.32
8.0.120.0050.00316.90
8.0.110.0050.00216.82
8.0.100.0000.00816.82
8.0.90.0030.00417.00
8.0.80.0040.01016.93
8.0.70.0040.00416.77
8.0.60.0040.00416.86
8.0.50.0040.00417.02
8.0.30.0070.01016.90
8.0.20.0140.00416.99
8.0.10.0000.00717.02
8.0.00.0120.00616.77
7.4.330.0000.00515.55
7.4.320.0040.00416.42
7.4.300.0070.00016.63
7.4.290.0040.00416.57
7.4.280.0080.00016.45
7.4.270.0070.00016.50
7.4.260.0040.00413.31
7.4.250.0040.00416.48
7.4.240.0050.00216.43
7.4.230.0030.00316.43
7.4.220.0040.00416.54
7.4.210.0040.01016.63
7.4.200.0040.00416.61
7.4.130.0110.00916.59
7.4.120.0110.01116.66
7.4.110.0140.00316.48
7.4.100.0110.01216.53
7.4.90.0110.00616.60
7.4.80.0080.01519.39
7.4.70.0060.01816.51
7.4.60.0120.01116.70
7.4.50.0090.00916.43
7.4.40.0160.00616.55
7.4.30.0160.00816.54
7.4.20.0160.00616.53
7.4.10.0140.00616.84
7.4.00.0040.01716.67
7.3.330.0030.00616.30
7.3.320.0050.00013.21
7.3.310.0060.00316.43
7.3.300.0030.00316.29
7.3.290.0100.00716.40
7.3.260.0060.01216.33
7.3.240.0080.01016.49
7.3.230.0100.00716.61
7.3.210.0080.01616.36
7.3.200.0060.01016.42
7.3.190.0140.00716.32
7.3.180.0030.01616.37
7.3.170.0130.01016.50
7.3.160.0140.00516.49
7.3.150.0100.01016.27
7.3.140.0130.01016.55
7.3.130.0120.00916.36
7.3.120.0130.01016.34
7.3.110.0140.00716.33
7.3.100.0130.01016.27
7.3.90.0080.01116.40
7.3.80.0000.02216.41
7.3.70.0100.01316.49
7.3.60.0100.01116.42
7.3.50.0110.01116.32
7.3.40.0160.00416.45
7.3.30.0100.01316.52
7.3.20.0110.00816.31
7.3.10.0120.01016.40
7.3.00.0130.01316.43
7.2.330.0110.00716.71
7.2.320.0100.00716.84
7.2.310.0090.01216.44
7.2.300.0120.00616.69
7.2.290.0090.00916.58
7.2.280.0150.00916.79
7.2.270.0100.01016.71
7.2.260.0130.01016.69
7.2.250.0170.00716.66
7.2.240.0060.02016.82
7.2.230.0100.01316.84
7.2.220.0060.01316.85
7.2.210.0070.01416.79
7.2.200.0090.02216.66
7.2.190.0090.01516.66
7.2.180.0150.01016.73
7.2.170.0040.01716.58
7.2.160.0110.01116.63
7.2.150.0140.00816.59
7.2.140.0170.00616.64
7.2.130.0110.01416.79
7.2.120.0140.01016.75
7.2.110.0170.00716.70
7.2.100.0130.01016.62
7.2.90.0130.01216.77
7.2.80.0030.02116.70
7.2.70.0100.02216.75
7.2.60.0160.01216.77
7.2.50.0070.01416.64
7.2.40.0130.00916.79
7.2.30.0130.00616.59
7.2.20.0060.01216.67
7.2.10.0150.01116.63
7.2.00.0060.01316.68

preferences:
38.41 ms | 400 KiB | 5 Q