3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php function rrmdir($dir) { foreach(glob($dir . '/*') as $file) { if(is_dir($file)) rrmdir($file); else unlink($file); } rmdir($dir); } $name = "oppo"; print_r(rrmdir($name)); echo $name; ?>
Output for 4.3.2 - 4.3.6, 4.3.9 - 7.1.0
Warning: rmdir(oppo): No such file or directory in /in/fd9tu on line 6 oppo
Output for 4.3.7 - 4.3.8
Warning: Invalid argument supplied for foreach() in /in/fd9tu on line 4 Warning: rmdir(oppo): No such file or directory in /in/fd9tu on line 6 oppo
Output for 4.3.0 - 4.3.1
Warning: rmdir(oppo) [http://www.php.net/function.rmdir]: No such file or directory in /in/fd9tu on line 6 oppo