3v4l.org

run code in 300+ PHP versions simultaneously
<?php class test2 { } class test3 { } class test { private $title ='test2'; function aaa() { return new $this->title(); } function bbb() { $title =$this->title(); return (new $this->title())(); } function title() { return 'test3'; } } $t = new test; var_dump($t->aaa()); var_dump($t->bbb()); ?>
Output for git.master, git.master_jit, rfc.property-hooks
object(test2)#2 (0) { } Fatal error: Uncaught Error: Object of type test2 is not callable in /in/YR5Zq:16 Stack trace: #0 /in/YR5Zq(24): test->bbb() #1 {main} thrown in /in/YR5Zq on line 16
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:
45.41 ms | 401 KiB | 8 Q