PHP fileinode() Function Last Updated : 28 Apr, 2025 Comments Improve Suggest changes Like Article Like Report The fileinode() function is an inbuilt function in PHP that returns the inode of the file. Syntax: fileinode(string $filename): int|falseParameter: This function has only one parameter: filename: This parameter specifies the path for the particular file.Return Value: This function returns the inode number of the file otherwise returns "false". Error: Depending upon the failure, an E_WARNING will be emitted. Example 1: The following code demonstrates the fileinode() function. PHP <?php $filename = "index.php"; if (getmyinode() == fileinode($filename)) { echo "You are checking the current file."; } ?> Output: You are checking the current file. Example 2: The following code is another demonstration of the fileinode() function. PHP <?php $filename = "text.txt"; if (getmyinode() == fileinode($filename)) { echo "You are checking the current file."; } else { echo "You are not checking the current files"; } ?> Output: You are not checking the current files Reference: https://www.php.net/manual/en/function.fileinode.php Create Quiz Comment N neeraj3304 Follow 0 Improve N neeraj3304 Follow 0 Improve Article Tags : PHP PHP-function PHP-Filesystem Explore BasicsPHP Syntax4 min readPHP Variables5 min readPHP | Functions6 min readPHP Loops4 min readArrayPHP Arrays5 min readPHP Associative Arrays4 min readMultidimensional arrays in PHP5 min readSorting Arrays in PHP4 min readOOPs & InterfacesPHP Classes2 min readPHP | Constructors and Destructors5 min readPHP Access Modifiers4 min readMultiple Inheritance in PHP4 min readMySQL DatabasePHP | MySQL Database Introduction4 min readPHP Database connection2 min readPHP | MySQL ( Creating Database )3 min readPHP | MySQL ( Creating Table )3 min readPHP AdvancePHP Superglobals6 min readPHP | Regular Expressions12 min readPHP Form Handling4 min readPHP File Handling4 min readPHP | Uploading File3 min readPHP Cookies9 min readPHP | Sessions7 min read Like