3v4l.org

run code in 300+ PHP versions simultaneously
<?php trait T1 { abstract protected function _doStuff(); } trait T2 { protected function _doStuff() { echo "Doing stuff in trait\n"; } } class C { use T1 { _doStuff as _traitDoStuff; } use T2 { _doStuff as _traitDoStuff; } protected function _doStuff() { echo "Doing stuff in class\n"; $this->_traitDoStuff(); } }
Output for git.master, git.master_jit, rfc.property-hooks
Fatal error: An alias was defined for method _doStuff(), which exists in both T1 and T2. Use T1::_doStuff or T2::_doStuff to resolve the ambiguity in /in/HKC2p on line 16
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:
24.32 ms | 401 KiB | 8 Q