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); // 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/Z6hWT on line 5 Deprecated: Creation of dynamic property ArrayObject::$prop is deprecated in /in/Z6hWT on line 8 ArrayObject Object ( [prop] => prop data [storage:ArrayObject:private] => Array ( [arr] => array data ) ) ArrayObject 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:
39.24 ms | 406 KiB | 5 Q