3v4l.org

run code in 300+ PHP versions simultaneously
<?php trait A { public $foo; function foo() { assert($this->foo === NULL); $this->foo = TRUE; } } trait B { public $foo; function bar() { assert($this->foo === NULL); $this->foo = TRUE; } } class C { use A, B; } $c = new C; $c->foo(); $c->bar();
Output for git.master, git.master_jit, rfc.property-hooks
Fatal error: Uncaught AssertionError: assert($this->foo === NULL) in /in/q8vOJ:9 Stack trace: #0 /in/q8vOJ(9): assert(false, 'assert($this->f...') #1 /in/q8vOJ(17): C->bar() #2 {main} thrown in /in/q8vOJ on line 9
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:
168.76 ms | 405 KiB | 5 Q