3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Logger { public function log() { set_error_handler('count'); echo __METHOD__ . "\n"; restore_error_handler(); } } function first_error_handler() { echo __FUNCTION__ . "\n"; } class ErrorHandler { public function handleError() { echo __METHOD__ . "\n"; (new Logger())->log(); } } set_error_handler('first_error_handler'); set_error_handler([new ErrorHandler(), 'handleError']); trigger_error('AN ERROR', E_USER_DEPRECATED); var_dump(set_error_handler(null));
Output for git.master, git.master_jit, rfc.property-hooks
ErrorHandler::handleError Logger::log array(2) { [0]=> object(ErrorHandler)#1 (0) { } [1]=> string(11) "handleError" }

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:
36.56 ms | 405 KiB | 5 Q