posix_errno_variation1.phpt 577 B

1234567891011121314151617181920212223
  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. --SKIPIF--
  8. <?php
  9. if(!extension_loaded("posix")) print "skip - POSIX extension not loaded";
  10. if(posix_getuid()==0) print "skip - Cannot run test as root.";
  11. ?>
  12. --FILE--
  13. <?php
  14. echo "*** Test by calling function with permission error ***\n";
  15. posix_setuid(0);
  16. var_dump(posix_errno());
  17. ?>
  18. --EXPECTF--
  19. *** Test by calling function with permission error ***
  20. int(1)