<?php scandir(string $directory, int $sorting_order = SCANDIR_SORT_ASCENDING, ?resource $context = null): array|false
<?php $tmp = tmpfile(); $dir = @scandir('/dev/fd'); if ($dir === false) { throw new \BadMethodCallException('Not supported on your platform because /dev/fd is not readable'); }