On the linux kernel, COW filesystems like BTRFS, BcacheFS, etc Inode numbers are not usable to determine if something is the same file.
This is intentional.(PHP 4, PHP 5, PHP 7, PHP 8)
fileinode ā Dosyanın düÄüm numarasını dƶndürür
Dosyanın düÄüm numarasını dƶndürür.
filenameDosya yolu.
Hata durumunda false aksi takdirde dosyanın düÄüm numarasını dƶndürür.
BaÅarısızlık durumunda bir
E_WARNING Ƨıktılanır.
Ćrnek 1 - Bir dosyanın düÄüm numarasının geƧerli dosya ile karÅılaÅtırılması
<?php
$dosya = 'index.php';
if (getmyinode() == fileinode($dosya)) {
echo 'GeƧerli dosyayı sınıyorsunuz.';
}
?>Bilginize: Bu iÅlevin sonuƧları ƶnbelleÄe kaydedilir. Daha ayrıntılı bilgi clearstatcache() iÅlevinde bulunabilir.
PHP 5.0.0 sürümünden itibaren bu iÅlev bazı URL sarmalayıcıları ile kullanılabilmektedir. stat() ailesini destekleyen sarmalayıcıların listesi Desteklenen Protokoller ve Sarmalayıcılar baÅlıÄı altında bulunabilir.
On the linux kernel, COW filesystems like BTRFS, BcacheFS, etc Inode numbers are not usable to determine if something is the same file.
This is intentional.As documented in https://www.php.net/manual/en/function.stat.php#refsect1-function.stat-returnvalues:
> On Windows, as of PHP 7.4.0, this is the identifier associated with the file, which is a 64-bit unsigned integer, so may overflow. Previously, it was always 0.
It appears that fileinode shares the same underlying implementation.