3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $dev_id = 1; $sop = array('1', '2', '3'); $insert_sop = ""; $it_sop = new ArrayIterator($sop); $c_sop = new CachingIterator($it_sop); foreach($c_sop as $ind_sop) { $insert_sop .= "($ind_sop, $dev_id)"; if ($c_sop->hasNext()) { $insert_sop .= ", "; } } echo $insert_rp; ?>
based on Ee1aq
Output for 5.0.4 - 7.2.0
Notice: Undefined variable: insert_rp in /in/NZngl on line 15
Output for 5.0.0 - 5.0.3
Notice: Undefined variable: insert_rp in /in/NZngl on line 15
Output for 4.3.2 - 4.4.9
Fatal error: Cannot instantiate non-existent class: arrayiterator in /in/NZngl on line 5
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Fatal error: Cannot instantiate non-existent class: arrayiterator in /in/NZngl on line 5