php8.5
Home/ Manual/ filesystem / functions/ fileinode

fileinode

PHP function Edit on GitHub ✎

(PHP 4, PHP 5, PHP 7, PHP 8)

Gets file inode

Description

fileinode(string $filename): int|false

Gets the file inode.

Parameters

filename

Path to the file.

Return Values

Returns the inode number of the file, Falseforfailure.

Errors/Exceptions Failure

Examples

Comparing the inode of a file with the current file

php
<?php
$filename = 'index.php';
if (getmyinode() == fileinode($filename)) {
    echo 'You are checking the current file.';
}
?>

Notes Clearstatcache Stat

See Also

Source: reference/filesystem/functions/fileinode.xml · from the official PHP manual (php/doc-en)