3v4l.org

run code in 300+ PHP versions simultaneously
<?php final class PluginClientFactory { private static $factory; public static function setFactory(callable $factory) { static::$factory = $factory; } public function createClient($client, array $plugins = [], array $options = []) { if (static::$factory) { return static::$factory($client, $plugins, $options); } return new PluginClient($client, $plugins, $options); } } PluginClientFactory::setFactory(function () {}); $factory = new PluginClientFactory(); $factory->createClient('client');
Output for git.master, git.master_jit, rfc.property-hooks
Warning: Undefined variable $factory in /in/WA5ek on line 15 Fatal error: Uncaught Error: Method name must be a string in /in/WA5ek:15 Stack trace: #0 /in/WA5ek(25): PluginClientFactory->createClient('client') #1 {main} thrown in /in/WA5ek on line 15
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:
39.21 ms | 406 KiB | 5 Q