touch_variation1.phpt 591 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. --TEST--
  2. touch() with times
  3. --CREDITS--
  4. Dave Kelsey <d_kelsey@uk.ibm.com>
  5. --SKIPIF--
  6. <?php
  7. if (substr(PHP_OS, 0, 3) == 'WIN') {
  8. die('skip.. Not valid for Windows');
  9. }
  10. ?>
  11. --FILE--
  12. <?php
  13. $filename = __DIR__."/touch_variation1.dat";
  14. var_dump(touch($filename, 101));
  15. var_dump(filemtime($filename));
  16. var_dump(fileatime($filename));
  17. @unlink($filename);
  18. @unlink($filename);
  19. var_dump(touch($filename, 100, 102));
  20. var_dump(filemtime($filename));
  21. var_dump(fileatime($filename));
  22. @unlink($filename);
  23. echo "Done\n";
  24. ?>
  25. --EXPECT--
  26. bool(true)
  27. int(101)
  28. int(101)
  29. bool(true)
  30. int(100)
  31. int(102)
  32. Done