3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { /** * @param callable $callback * @return Rocket_Auth_Adapter_Interface */ public function registerAuthCallback($callback) { $this->authCallback = $callback; } /** * @param Zend_Auth_Result $result * @return Zend_Auth_Result */ public function authCallback(Zend_Auth_Result $result) { $successCallback = $this->authCallback; if (is_callable($successCallback)) { $result = $successCallback($result); } return $result; } } class Bar { public function callback(Zend_Auth_Result $result) { echo 'herewego '; } } class Zend_Auth_Result { } function my_callback(Zend_Auth_Result $result) { ' here we go (plain function)'; } $foo = new Foo(); $bar = new Bar(); $foo->registerAuthCallback('callback'); $result = new Zend_Auth_Result(); $foo->authCallback($result);
Output for git.master, git.master_jit, rfc.property-hooks
Deprecated: Creation of dynamic property Foo::$authCallback is deprecated in /in/TlEXP on line 10

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