3v4l.org

run code in 300+ PHP versions simultaneously
<?php class a { var $prop; public function change() { $prop=2; } public function output() { echo $prop,"\r\n"; } } class b { public function change() { $this->prop=2; } public function output() { echo $this->prop; } } $objA=new a(); $objB=new b(); $objA->change(); $objA->output(); $objB->change(); $objB->output();
Output for git.master_jit, git.master, rfc.property-hooks
Warning: Undefined variable $prop in /in/gAvDm on line 13 Deprecated: Creation of dynamic property b::$prop is deprecated in /in/gAvDm on line 21 2

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