3v4l.org

run code in 500+ PHP versions simultaneously
<?php class A { private $var = 'test'; public function test() { echo $this->var . "\n"; } public function __get($name) { trigger_error('In __get()', E_USER_NOTICE); return $this->$name ?? NULL; } } class B { } $a = new A(); $b = new B(); $a->test(); echo($a->var); var_dump($b->blag);
Output for git.master_jit, git.master
test Notice: In __get() in /in/9uHdt on line 11 test Warning: Undefined property: B::$blag in /in/9uHdt on line 25 NULL

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:
42.14 ms | 889 KiB | 4 Q