3v4l.org

run code in 500+ 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; PersonPL::whereFrom insteadof PersonENG; } } $objectA = new TestA(); $objectA->sayHello("Anna"); $objectA->whereFrom("Polski");
Output for rfc.property-hooks, git.master, git.master_jit
Witaj, nazywam się AnnaJestem z Polski

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:
54.5 ms | 2109 KiB | 4 Q