fileinode()
fileinode() — Gets file inode.
Built-in function of PHP 8.5. The manual lists it as available in PHP 4, PHP 5, PHP 7, PHP 8. This page is the reference card: signature, parameters and return value, plus the changelog and the example the manual provides.
Signature
fileinode(string $filename): int|false
Parameters
| Parameter | Type | What it takes |
|---|---|---|
| $filename | string | Path to the file. |
Return value
Returns the inode number of the file, or false on failure.
Example
A runnable snippet:
$filename = 'index.php'; if (getmyinode() == fileinode($filename)) { echo 'You are checking the current file.'; }
See also
All PHP 8.5 built-in functions
Reference card built from the PHP manual page fileinode() (PHP documentation, CC BY 3.0). The page is generated from the manual, so the wording of the parameter and return value text follows php.net.