3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = new ArrayObject(array(), ArrayObject::STD_PROP_LIST); $a['arr'] = 'array data'; $a->prop = 'prop data'; $b = new ArrayObject(); $b['arr'] = 'array data'; $b->prop = 'prop data'; // ArrayObject Object // ( // [prop] => prop data // ) print_r($a->prop); // ArrayObject Object // ( // [arr] => array data // ) print_r($b);
Output for git.master, git.master_jit, rfc.property-hooks
Deprecated: Creation of dynamic property ArrayObject::$prop is deprecated in /in/O4UCj on line 5 Deprecated: Creation of dynamic property ArrayObject::$prop is deprecated in /in/O4UCj on line 8 prop dataArrayObject Object ( [prop] => prop data [storage:ArrayObject:private] => Array ( [arr] => array data ) )

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:
37.48 ms | 402 KiB | 8 Q