3v4l.org

run code in 300+ PHP versions simultaneously
<?php $dev_id = 1; $insert_rp = ""; $personnel = array('Josh Haywood', 'Josh Cubbison', 'Brian Kang'); $it_personnel = new ArrayIterator($personnel); $c_personnel = new CachingIterator($c_personnel); foreach($c_personnel as $pers) { $insert_rp .= "($pers, $dev_id)"; if ($c_personnel->hasNext()) { $insert_rp .= ","; } } ?>
Output for git.master, git.master_jit, rfc.property-hooks
Warning: Undefined variable $c_personnel in /in/kRdaT on line 6 Fatal error: Uncaught TypeError: CachingIterator::__construct(): Argument #1 ($iterator) must be of type Iterator, null given in /in/kRdaT:6 Stack trace: #0 /in/kRdaT(6): CachingIterator->__construct(NULL) #1 {main} thrown in /in/kRdaT on line 6
Process exited with code 255.

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:
56.56 ms | 401 KiB | 8 Q