3v4l.org

run code in 500+ PHP versions simultaneously
<?php class C { public string $prop = 'x'; } $c = new C; $ao = new ArrayObject($c); var_dump($c->prop);
Output for master
Deprecated: ArrayObject::__construct(): Using an object as a backing array for ArrayObject is deprecated, as it allows violating class constraints and invariants in /in/8JtDq on line 6 string(1) "x"

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:
12.93 ms | 1167 KiB | 7 Q