socket_strerror.phpt 436 B

12345678910111213141516171819202122
  1. --TEST--
  2. ext/sockets - socket_strerror - basic test
  3. --CREDITS--
  4. Florian Anderiasch
  5. fa@php.net
  6. --EXTENSIONS--
  7. sockets
  8. --SKIPIF--
  9. <?php
  10. if (!stristr(PHP_OS, "Linux")) {
  11. die('skip - test validates linux error strings only.');
  12. }
  13. ?>
  14. --FILE--
  15. <?php
  16. /* Only test one representative error code here,
  17. * as messages will differ depending on the used libc. */
  18. var_dump(socket_strerror(1));
  19. ?>
  20. --EXPECT--
  21. string(23) "Operation not permitted"