3v4l.org

run code in 300+ PHP versions simultaneously
<?php declare(ticks=1) function tick_handler() { echo "tick_handler() called\n"; } tick_handler(); function inverse($x) { tick_handler(); if (1/0) { throw new Exception('Division by zero.'); } return 1/$x; } try { echo inverse(5) . "\n"; echo inverse(0) . "\n"; } catch (Exception $e) { echo 'Caught exception: ', $e->getMessage(), "\n"; } echo inverse(0) . "\n"; ?>

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)
5.4.200.0120.07012.36
5.4.190.0740.05512.25
5.4.180.0560.05412.26
5.4.170.0520.05612.26
5.4.160.0140.04912.37
5.4.150.0590.05812.25
5.4.140.0600.06411.93
5.4.130.0250.05811.91
5.4.120.0260.05711.87
5.4.110.0280.05611.87
5.4.100.0400.06311.87
5.4.90.0660.07311.86
5.4.80.0240.05311.86
5.4.70.0320.05211.86
5.4.60.0310.05211.86
5.4.50.0200.05011.99
5.4.40.0160.04511.98
5.4.30.0140.04611.98
5.4.20.0190.04811.97
5.4.10.0180.05211.98
5.4.00.0200.07411.47
5.3.270.0170.05212.73
5.3.260.0140.05312.72
5.3.250.0140.05412.72
5.3.240.0210.05412.72
5.3.230.0360.07512.71
5.3.220.0280.04912.68
5.3.210.0240.04912.68
5.3.200.0280.05112.68
5.3.190.0310.07812.68
5.3.180.0320.05412.67
5.3.170.0360.05512.67
5.3.160.0260.05712.67
5.3.150.0250.05613.59
5.3.140.0320.05413.59
5.3.130.0440.06013.61
5.3.120.0320.05213.53
5.3.110.0320.05513.59
5.3.100.0320.04213.05
5.3.90.0240.04013.06
5.3.80.0280.03513.02
5.3.70.0250.04213.02
5.3.60.0300.06612.96
5.3.50.0270.05812.90
5.3.40.1730.04212.94
5.3.30.0280.03912.94
5.3.20.0330.05112.64
5.3.10.0220.04612.57
5.3.00.0240.03712.58

preferences:
135.44 ms | 1394 KiB | 7 Q