3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A { public function x(): void {} } set_error_handler(function() { echo 'handled'; }); register_shutdown_function(function() { echo 'shutdown...'; }); echo 'before test...'; try { if (time() > 0) { // wrap in if to make sure an error is not throw at compile time class B extends A { public function x() {} } } } catch (\Throwable $e) { echo 'catched'; }

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)
7.4.70.0100.01016.48
7.4.60.0170.00716.52
7.4.50.0130.01016.34
7.4.40.0170.00316.43
7.4.30.0090.00916.37
7.4.20.0040.01516.48
7.4.10.0000.01916.41
7.4.00.0150.00616.36
7.3.190.0120.01216.49
7.3.180.0070.01316.44
7.3.170.0120.00916.46
7.3.160.0060.00916.09
7.3.150.0040.01516.43
7.3.140.0100.00716.35
7.3.130.0030.01416.20
7.3.120.0070.01016.28
7.3.110.0140.00616.33
7.3.100.0040.01216.57
7.3.90.0060.01016.33
7.3.80.0100.00616.24
7.3.70.0130.00316.29
7.3.60.0140.00716.15
7.3.50.0150.00616.36
7.3.40.0030.01316.28
7.3.30.0070.01016.38
7.3.20.0130.00316.28
7.3.10.0070.01016.23
7.3.00.0000.01516.46
7.2.310.0170.00016.43
7.2.300.0030.01316.42
7.2.290.0030.01316.59
7.2.280.0180.00316.58
7.2.270.0130.00616.55
7.2.260.0110.00616.63
7.2.250.0120.00616.70
7.2.240.0030.01316.68
7.2.230.0160.00616.60
7.2.220.0120.00616.68
7.2.210.0100.00716.39
7.2.200.0140.00316.57
7.2.190.0060.01116.38
7.2.180.0140.00316.38
7.2.170.0100.00716.62
7.2.160.0070.01016.63
7.2.150.0070.01016.59
7.2.140.0110.00716.43
7.2.130.0100.00716.72
7.2.120.0130.00316.62
7.2.110.0070.01016.50
7.2.100.0120.00416.53
7.2.90.0100.00716.73
7.2.80.0030.01416.57
7.2.70.0120.00616.54
7.2.60.0100.01016.41
7.2.50.0030.01716.62
7.2.40.0110.00616.60
7.2.30.0030.01416.54
7.2.20.0060.01216.51
7.2.10.0060.01316.46
7.2.00.0120.00816.62

preferences:
37.01 ms | 400 KiB | 5 Q