3v4l.org

run code in 500+ PHP versions simultaneously
<?php trait UserLevel(){ public function get($level = 'one'){ $this->where('user', $level)->get(); } } trait SpecialUser(){ public function get(){ $this->where('special','yes')->get(); } } Class GetUser{ use UserLevel, SpecialUser; } $user = new GetUser; $user->get() //Ideally I want the methods should be chained as $this->where('special','yes') //->where('user','one')->get();
Output for git.master_jit, git.master
Parse error: syntax error, unexpected token "(", expecting "{" in /in/bk3ae on line 3
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:
43.66 ms | 592 KiB | 3 Q