3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php if (class_exists('RecursiveDirectoryIterator')) { $i1 = new RecursiveDirectoryIterator('/tmp'); $i2 = new RecursiveDirectoryIterator('/home'); iterator_to_array($i1); iterator_to_array($i2); var_dump($i1 == $i2); } else { var_dump('Class RecursiveDirectoryIterator does not exist'); }
based on baBjg
Output for 5.1.0 - 5.6.28, 7.0.0 - 7.1.0
bool(true)
Output for hhvm-3.10.0 - 3.12.0
bool(false)
Output for 5.0.0 - 5.0.5
Fatal error: Call to undefined function iterator_to_array() in /in/IE3p3 on line 7
Process exited with code 255.
Output for 4.3.0 - 4.4.9
string(47) "Class RecursiveDirectoryIterator does not exist"