3v4l.org

run code in 300+ PHP versions simultaneously
<?php class C { private $_arr = []; public $arr { &get => $this->_arr; } } $c = new C(); $c->arr['beep'] = 'boop'; var_dump($c);
Output for rfc.property-hooks
object(C)#1 (1) { ["_arr":"C":private]=> array(1) { ["beep"]=> string(4) "boop" } }

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:
140.87 ms | 1399 KiB | 8 Q