3v4l.org

run code in 300+ PHP versions simultaneously
<?php trait PersonPL{ public function sayHello($name){ echo 'Witaj, nazywam siÄ™ '.$name; } public function whereFrom($country){ echo 'Jestem z '.$country; } } trait PersonENG{ public function sayHello($name){ echo 'Hi, my name is '.$name; } public function whereFrom($country){ echo 'I am form '.$country; } } class TestA{ use PersonPL, PersonENG{ PersonPL::sayHello insteadof PersonENG; PersonENG::sayHello insteadof PersonPL; PersonPL::whereFrom insteadof PersonENG; } } $objA = new TestA(); $objA->sayHello('Anna'); $objA->whereFrom('Polski');
Output for git.master, git.master_jit, rfc.property-hooks
Fatal error: Uncaught Error: Call to undefined method TestA::sayHello() in /in/KtBk0:35 Stack trace: #0 {main} thrown in /in/KtBk0 on line 35
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:
45.86 ms | 401 KiB | 8 Q