The linkinfo() function returns information about a hard link. The function returns the device ID returned by the lstat system call. It returns 0 or FALSE in case of error.
Syntax
linkinfo(link_path)
Parameters
link_path − The link of the path to check.
Return
The linkinfo() function returns the device ID returned by the lstat system call. It returns 0 or FALSE in case of error.
Example
<?php echo linkinfo('/vmlinuz'); ?>
The following is the output that returns the device ID.
Output
332
Let us see another example.
Example
<?php echo linkinfo('/new); ?>
The following is the output that shows the link does not exist.
Output
0