PHP linkinfo() Function Last Updated : 28 Apr, 2025 Comments Improve Suggest changes Like Article Like Report The linkinfo() function is an inbuilt function in PHP that retrieves information related to the links. This function checks the link is pointed to by the path that exists. Syntax: linkinfo(string $path)Parameter: This function accepts one parameter that is described below: $path: This parameter specifies the link for the file path.Return Values: The 'linkinfo()' function returns information about link a file link. It will return a positive integer value on success, otherwise, return -1 for not found the link. Example 1: The following code demonstrates the linkinfo() function. PHP <?php echo linkinfo('/dev'); ?> Note: Output will be different according to your system. Output: 5 Example 2: The following code demonstrates the linkinfo() function. PHP <?php $num = linkinfo('/gfg') ; if($num == -1){ echo "Link is not existing"; } else { echo "Link is existing" ; } ?> Output: Link is existing Reference: https://www.php.net/manual/en/function.linkinfo.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