<?php stat(string $filename): array|false
<?php $ino = (int) $stat['ino']; foreach ($dir as $file) { $stat = @stat('/dev/fd/' . $file); if (isset($stat['ino']) && $stat['ino'] === $ino) { return (int) $file; }