3v4l.org

run code in 300+ PHP versions simultaneously
<?php namespace Foo { interface FooInterface { public function foo(string $str); } } namespace Bar { 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 Error: Interface "Bar\FooInterface" not found in /in/7UNP3:13 Stack trace: #0 {main} thrown in /in/7UNP3 on line 13
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:
66.78 ms | 401 KiB | 8 Q