3v4l.org

run code in 300+ PHP versions simultaneously
<?php class B { public $c=12; } class A { function __construct() { $this->va = function() { return new B; }; } } $o=new A; var_dump($o); var_dump($o->va());
Output for git.master, git.master_jit, rfc.property-hooks
Deprecated: Creation of dynamic property A::$va is deprecated in /in/G8NOf on line 8 object(A)#1 (1) { ["va"]=> object(Closure)#2 (1) { ["this"]=> *RECURSION* } } Fatal error: Uncaught Error: Call to undefined method A::va() in /in/G8NOf:17 Stack trace: #0 {main} thrown in /in/G8NOf on line 17
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.28 ms | 401 KiB | 8 Q