(PHP 4, PHP 5, PHP 7, PHP 8)
fileinode — Gets file inode
filename
Path to the file.
Returns the inode number of the file, або false
в разі помилки.
Під час збоїв буде видаватись E_WARNING
.
Приклад #1 Comparing the inode of a file with the current file
<?php
$filename = 'index.php';
if (getmyinode() == fileinode($filename)) {
echo 'You are checking the current file.';
}
?>
Зауваження: Рузультати цієї функції кешуються. Докладніше: clearstatcache().
Починаючи з PHP 5.0.0, ця функція також може бути використана з деякими URL-обгортками. На сторінці Підтримувані протоколи та обгортки вказано, які обгортки підтримують сімейство функцій stat().