3v4l.org

run code in 300+ PHP versions simultaneously
<?php set_error_handler(function(){ if (strpos($errstr, 'Class')) { var_dump('foo'); return true; } return false; }); register_shutdown_function('fatalErrorShutdownHandler'); function fatalErrorShutdownHandler() { $last_error = error_get_last(); if ($last_error['type'] === E_ERROR) { // fatal error myErrorHandler(E_ERROR, $last_error['message'], $last_error['file'], $last_error['line']); } } Everything::is('awesome'); echo Everything;
Output for git.master, git.master_jit, rfc.property-hooks
Fatal error: Uncaught Error: Class "Everything" not found in /in/ZGrcH:32 Stack trace: #0 {main} thrown in /in/ZGrcH on line 32 Fatal error: Uncaught Error: Call to undefined function myErrorHandler() in /in/ZGrcH:24 Stack trace: #0 [internal function]: fatalErrorShutdownHandler() #1 {main} thrown in /in/ZGrcH on line 24
Process exited with code 255.

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:
58.81 ms | 401 KiB | 8 Q