3v4l.org

run code in 300+ PHP versions simultaneously
<?php class c1 { public function test() { echo 'c1<br />'; return [1]; } } trait t1 { public function rules() { return [2]; } } trait t2 { public function rules() { return [3]; } } class c2 extends c1 { use t1, t2 { t1::rules as t1Rules; t2::rules as t2Rules; } public function test() { echo 'c2<br />'; return array_merge(parent::test(), t1Rules(), t2Rules(), [4]); } } $obj = new c2(); echo '<pre>'; print_r($obj->test());
Output for git.master, git.master_jit, rfc.property-hooks
Fatal error: Trait method t2::rules has not been applied as c2::rules, because of collision with t1::rules in /in/4Gu5l on line 21
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:
57.21 ms | 401 KiB | 8 Q