3v4l.org

run code in 300+ PHP versions simultaneously
<?php function test(Closure $test) { try { $test(); } catch (Throwable $e) { var_dump([get_class($e) => $e->getMessage()]); echo 'catch!', PHP_EOL; } } test(function () { include __DIR__ . '/a.php'; }); test(function () { require __DIR__ . '/b.php'; }); echo 'done.' . PHP_EOL;
Output for git.master, git.master_jit, rfc.property-hooks
Warning: include(/in/a.php): Failed to open stream: No such file or directory in /in/8Y1rf on line 12 Warning: include(): Failed opening '/in/a.php' for inclusion (include_path='.:') in /in/8Y1rf on line 12 Warning: require(/in/b.php): Failed to open stream: No such file or directory in /in/8Y1rf on line 13 array(1) { ["Error"]=> string(55) "Failed opening required '/in/b.php' (include_path='.:')" } catch! done.

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
66.23 ms | 405 KiB | 9 Q