3v4l.org

run code in 300+ PHP versions simultaneously
<?php function accept_callable(callable $arg) {} class Foo { public function __construct() { set_error_handler([$this, 'log_error']); set_exception_handler([$this, 'log_exception']); } private function log_error( $type, $message, $file, $line ) { echo "log error" . PHP_EOL; return true; } public function log_exception( $e ) { echo "log exception" . PHP_EOL; var_dump($e); } } $foo = new Foo(); $previousHandler = set_error_handler(static fn () => false); restore_error_handler(); accept_callable($previousHandler);

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.130.0140.00618.01
8.4.120.0120.00820.49
8.4.110.0130.00918.93
8.4.100.0040.00517.68
8.4.90.0150.00617.81
8.4.80.0120.00818.05
8.4.70.0110.01019.57
8.4.60.0110.00618.78
8.4.50.0120.00818.75
8.4.40.0090.00017.86
8.4.30.0060.00918.77
8.4.20.0110.00019.79
8.4.10.0070.00319.72
8.3.260.0110.00916.38
8.3.250.0130.00419.05
8.3.240.0120.00618.85
8.3.230.0130.00716.79
8.3.220.0110.00718.42
8.3.210.0110.00816.62
8.3.200.0050.00316.58
8.3.190.0070.01018.98
8.3.180.0100.00917.12
8.3.170.0070.01418.86
8.3.160.0140.00417.19
8.3.150.0180.00017.24
8.3.140.0050.00316.55
8.3.130.0080.00018.47
8.3.120.0030.00718.94
8.3.110.0070.00316.64
8.3.100.0040.00418.34
8.3.90.0040.00426.77
8.3.80.0070.00718.43
8.3.70.0240.00717.97
8.3.60.0270.00417.97
8.3.50.0060.00718.45
8.3.40.0210.00317.97
8.3.30.0200.00817.97
8.3.20.0250.00317.97
8.3.10.0180.00717.97
8.3.00.0220.00517.97
8.2.290.0070.00920.26
8.2.280.0120.00318.43
8.2.270.0130.00617.38
8.2.260.0040.00418.32
8.2.250.0000.00916.73
8.2.240.0100.01017.47
8.2.230.0100.00620.94
8.2.220.0040.01224.06
8.2.210.0080.00026.77
8.2.200.0030.00618.29
8.2.190.0210.00617.97
8.2.180.0210.00617.97
8.2.170.0200.00917.97
8.2.160.0220.00417.97
8.2.150.0240.00317.97
8.2.140.0250.00517.97
8.2.130.0200.00517.97
8.2.120.0170.01017.97
8.2.110.0220.00617.97
8.2.100.0200.00517.97
8.2.90.0200.00517.97
8.2.80.0200.00517.97
8.2.70.0200.00617.97
8.2.60.0250.00317.97
8.2.50.0220.00417.97
8.2.40.0170.00717.97
8.2.30.0210.00417.97
8.2.20.0230.00517.97
8.2.10.0220.00317.97
8.2.00.0210.00417.97
8.1.330.0070.00618.67
8.1.320.0140.00718.13
8.1.310.0110.00816.64
8.1.300.0040.00419.62
8.1.290.0090.00330.84
8.1.280.0190.00817.97
8.1.270.0210.00817.97
8.1.260.0200.00617.97
8.1.250.0250.00217.97
8.1.240.0190.00617.97
8.1.230.0180.00717.97
8.1.220.0240.00517.97
8.1.210.0240.00717.97
8.1.200.0210.00817.97
8.1.190.0220.00617.97
8.1.180.0250.00417.97
8.1.170.0240.00617.97
8.1.160.0320.00117.97
8.1.150.0200.00417.97
8.1.140.0190.00317.97
8.1.130.0190.00417.97
8.1.120.0180.00517.97
8.1.110.0180.00717.97
8.1.100.0220.00217.97
8.1.90.0180.00517.97
8.1.80.0170.00417.97
8.1.70.0140.00917.97
8.1.60.0230.00717.97
8.1.50.0160.00717.97
8.1.40.0170.00617.97
8.1.30.0150.01117.97
8.1.20.0260.00617.97
8.1.10.0180.00917.97
8.1.00.0190.01017.97

preferences:
39.59 ms | 403 KiB | 5 Q