3v4l.org

run code in 300+ PHP versions simultaneously
<?php interface fooAPI{ public function doFoo(); } trait fooable{ protected $foo; public function __construct( $foo ){ $this->_foo = $foo; } public function doFoo(){ return $this->_foo; } } class Foo{ use fooable{ fooable::__construct as _fooable__construct; _fooable__construct as protected; } public function __construct(){ $this->_fooable__construct( "foo" ); } } echo (new Foo)->doFoo();
Output for git.master, git.master_jit, rfc.property-hooks
Fatal error: The modifiers of the trait method _fooable__construct() are changed, but this method does not exist. Error in /in/YllN2 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:
56.7 ms | 401 KiB | 8 Q