mirror of
https://github.com/php/php-src.git
synced 2025-08-20 09:24:05 +02:00

The messages differ by used libc and version, so let's not try to do exhaustive testing here.
22 lines
500 B
PHP
22 lines
500 B
PHP
--TEST--
|
|
ext/sockets - socket_strerror - basic test
|
|
--CREDITS--
|
|
Florian Anderiasch
|
|
fa@php.net
|
|
--SKIPIF--
|
|
<?php
|
|
if (!extension_loaded('sockets')) {
|
|
die('skip sockets extension not available.');
|
|
}
|
|
if (!stristr(PHP_OS, "Linux")) {
|
|
die('skip - test validates linux error strings only.');
|
|
}
|
|
?>
|
|
--FILE--
|
|
<?php
|
|
/* Only test one representative error code here,
|
|
* as messages will differ depending on the used libc. */
|
|
var_dump(socket_strerror(1));
|
|
?>
|
|
--EXPECT--
|
|
string(23) "Operation not permitted"
|