3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php function is_empty_dir($dir) { if (($files = @scandir($dir)) && count($files) <= 2) { return true; } return false; } echo is_empty_dir("/tmp");
based on j0o0k
Output for 5.3.20 - 5.5.24, 5.6.28, 7.0.20 - 7.2.0
1
Output for 5.5.25 - 5.6.21, 7.0.0 - 7.0.6