3v4l.org

run code in 300+ PHP versions simultaneously
<?php trait BazTrait { public function handle() { echo __CLASS__, static::class, PHP_EOL; } } class c1 { use BazTrait; public function do() { $this->handle(); } } class c2 { use BazTrait; public function do() { $this->handle(); } } class c3 extends c2 { } (new c1)->do(); (new c2)->do(); (new c3)->do();
Output for git.master, git.master_jit, rfc.property-hooks
c1c1 c2c2 c2c3

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:
32.36 ms | 405 KiB | 5 Q