posix_errno_variation1.phpt 509 B

123456789101112131415161718192021222324
  1. --TEST--
  2. Test function posix_errno() by calling it with with permission error
  3. --CREDITS--
  4. Morten Amundsen mor10am@gmail.com
  5. Francesco Fullone ff@ideato.it
  6. #PHPTestFest Cesena Italia on 2009-06-20
  7. --EXTENSIONS--
  8. posix
  9. --SKIPIF--
  10. <?php
  11. if(posix_getuid()==0) print "skip - Cannot run test as root.";
  12. ?>
  13. --FILE--
  14. <?php
  15. echo "*** Test by calling function with permission error ***\n";
  16. posix_setuid(0);
  17. var_dump(posix_errno());
  18. ?>
  19. --EXPECT--
  20. *** Test by calling function with permission error ***
  21. int(1)