005_basic.phpt 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. --TEST--
  2. Test fileatime(), filemtime(), filectime() & touch() functions : basic functionality
  3. --FILE--
  4. <?php
  5. echo "*** Testing the basic functionality with file ***\n";
  6. print( @date('Y:M:D:H:i:s', fileatime(__FILE__)) )."\n";
  7. print( @date('Y:M:D:H:i:s', filemtime(__FILE__)) )."\n";
  8. print( @date('Y:M:D:H:i:s', filectime(__FILE__)) )."\n";
  9. print( @date('Y:M:D:H:i:s', touch(__DIR__."/005_basic.tmp")) )."\n";
  10. echo "*** Testing the basic functionality with dir ***\n";
  11. print( @date('Y:M:D:H:i:s', fileatime(".")) )."\n";
  12. print( @date('Y:M:D:H:i:s', filemtime(".")) )."\n";
  13. print( @date('Y:M:D:H:i:s', filectime(".")) )."\n";
  14. print( @date('Y:M:D:H:i:s', touch(__DIR__."/005_basic")) )."\n";
  15. echo "\n*** Done ***\n";
  16. ?>
  17. --CLEAN--
  18. <?php
  19. unlink(__DIR__."/005_basic.tmp");
  20. unlink(__DIR__."/005_basic");
  21. ?>
  22. --EXPECTF--
  23. *** Testing the basic functionality with file ***
  24. %d:%s:%s:%d:%d:%d
  25. %d:%s:%s:%d:%d:%d
  26. %d:%s:%s:%d:%d:%d
  27. %d:%s:%s:%d:%d:%d
  28. *** Testing the basic functionality with dir ***
  29. %d:%s:%s:%d:%d:%d
  30. %d:%s:%s:%d:%d:%d
  31. %d:%s:%s:%d:%d:%d
  32. %d:%s:%s:%d:%d:%d
  33. *** Done ***