3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = array('property1' => 'foo', 'property2' => array('foo1', 'foo2') ); $arrayobject = new ArrayObject($array); $iterator = $arrayobject->getIterator(); while($iterator->valid()) { if(is_array($iterator->current())){ $arrayobject_2 = new ArrayObject($iterator->current()); $it = $arrayobject_2->getIterator(); while($it->valid()) { echo $it->key() . ' => ' . $it->current() . "\n"; $it->next(); } } else echo $iterator->key() . ' => ' . $iterator->current() . "\n"; $iterator->next(); }
Output for git.master, git.master_jit, rfc.property-hooks
property1 => foo 0 => foo1 1 => foo2

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:
117.41 ms | 405 KiB | 5 Q