fileinode_basic.phpt 606 B

12345678910111213141516171819202122232425262728293031
  1. --TEST--
  2. Test fileinode() function: Basic functionality
  3. --FILE--
  4. <?php
  5. echo "*** Testing fileinode() with file, directory ***\n";
  6. /* Getting inode of created file */
  7. $file_path = __DIR__;
  8. fopen("$file_path/inode.tmp", "w");
  9. print( fileinode("$file_path/inode.tmp") )."\n";
  10. /* Getting inode of current file */
  11. print( fileinode(__FILE__) )."\n";
  12. /* Getting inode of directories */
  13. print( fileinode(".") )."\n";
  14. print( fileinode("./..") )."\n";
  15. echo "\n*** Done ***";
  16. --CLEAN--
  17. <?php
  18. unlink (__DIR__."/inode.tmp");
  19. ?>
  20. --EXPECTF--
  21. *** Testing fileinode() with file, directory ***
  22. %i
  23. %i
  24. %i
  25. %i
  26. *** Done ***