1--TEST--
2Test fileinode() function: Basic functionality
3--FILE--
4<?php
5/*
6Prototype: int fileinode ( string $filename );
7Description: Returns the inode number of the file, or FALSE in case of an error.
8*/
9
10echo "*** Testing fileinode() with file, directory ***\n";
11
12/* Getting inode of created file */
13$file_path = __DIR__;
14fopen("$file_path/inode.tmp", "w");
15print( fileinode("$file_path/inode.tmp") )."\n";
16
17/* Getting inode of current file */
18print( fileinode(__FILE__) )."\n";
19
20/* Getting inode of directories */
21print( fileinode(".") )."\n";
22print( fileinode("./..") )."\n";
23
24echo "\n*** Done ***";
25--CLEAN--
26<?php
27unlink (__DIR__."/inode.tmp");
28?>
29--EXPECTF--
30*** Testing fileinode() with file, directory ***
31%i
32%i
33%i
34%i
35
36*** Done ***
37