3v4l.org

run code in 300+ PHP versions simultaneously
<?php namespace Foo { interface FooInterface { public function foo(string $str); } } namespace Bar { use Foo\FooInterface; class BarClass implements FooInterface { public function foo(string $str) { } } if (version_compare(PHP_VERSION, '7.0', '<')) { function type_hint($code, $error) { if (strpos($error, 'string, string') !== false) { return true; } if (strpos($error, 'int, integer') !== false) { return true; } if (strpos($error, 'bool, boolean') !== false) { return true; } if (strpos($error, 'float, double') !== false) { return true; } return false; } } set_error_handler('type_hint', E_RECOVERABLE_ERROR); }
Output for git.master, git.master_jit, rfc.property-hooks
Fatal error: Uncaught TypeError: set_error_handler(): Argument #1 ($callback) must be a valid callback or null, function "type_hint" not found or invalid function name in /in/Jnclu:44 Stack trace: #0 /in/Jnclu(44): set_error_handler('type_hint', 4096) #1 {main} thrown in /in/Jnclu on line 44
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:
32.97 ms | 401 KiB | 8 Q