3v4l.org

run code in 300+ PHP versions simultaneously
<?php function save_order() { if(1==1){ throw new exception('caught exception'); } } function set_order_number() { echo 'SET_ORDER_NUMBER'.PHP_EOL; } function set_plan_id() { echo 'SET PLAN ID'.PHP_EOL; } try{ save_order(); //for testing purposed, guaranteed to throw exception set_order_number(); set_plan_id(); //WHY DOES THIS STILL EXECUTE? }catch(Exception $e){ header('Internal Server Error', true, 500) echo json_encode(array('msg'=>$e->getMessage()); exit; }

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.0.20.0270.06320.24
7.0.10.0000.06320.24
7.0.00.0030.05320.15
5.6.170.0470.06320.62
5.6.160.0100.04720.54
5.6.150.0030.08718.19
5.6.140.0070.04018.21
5.6.130.0030.07318.20
5.6.120.0100.03720.97
5.6.110.0070.08021.02
5.6.100.0070.03721.14
5.6.90.0070.07720.98
5.6.80.0070.08020.52
5.5.310.0300.03720.20
5.5.300.0070.08718.04
5.5.290.0070.07717.98
5.5.280.0230.06720.98
5.5.270.0170.07720.87
5.5.260.0100.08320.84
5.5.250.0170.06720.71
5.5.240.0300.05020.29

preferences:
139.2 ms | 1398 KiB | 7 Q