3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $iterator = new \SimpleXmlIterator('<xml><fotoshow><image>http://bild.gottes-platz-an-der-sonne.himmel.1/avater.png</image><image/><image/></fotoshow></xml>'); $images = $iterator->images->image; foreach ($images as $value) { var_dump($value); var_dump(empty($value)); }
Output for 5.3.0 - 5.6.28, 7.0.0 - 7.1.0
Warning: Invalid argument supplied for foreach() in /in/HDpW6 on line 4
Output for hhvm-3.10.0 - 3.12.0
Warning: Invalid argument supplied for foreach() in /in/HDpW6 on line 7
Output for 5.0.0 - 5.2.17
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /in/HDpW6 on line 2 Warning: Invalid argument supplied for foreach() in /in/HDpW6 on line 4
Output for 4.3.2 - 4.4.9
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /in/HDpW6 on line 2 Fatal error: Cannot instantiate non-existent class: simplexmliterator in /in/HDpW6 on line 2
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /in/HDpW6 on line 2 Fatal error: Cannot instantiate non-existent class: simplexmliterator in /in/HDpW6 on line 2