3v4l.org

run code in 300+ PHP versions simultaneously
<?php trait Tester { private $a = 1; protected $b = 2; public $c = 3; private function A() { return 'a'; } protected function B() { return 'b'; } } class Test { use Tester; public function dump() { var_dump($this); var_dump(get_class_methods($this)); } } $t = new Test; $t->dump();
Output for git.master, git.master_jit, rfc.property-hooks
object(Test)#1 (3) { ["a":"Test":private]=> int(1) ["b":protected]=> int(2) ["c"]=> int(3) } array(3) { [0]=> string(4) "dump" [1]=> string(1) "A" [2]=> string(1) "B" }

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:
49.96 ms | 401 KiB | 8 Q