1
0
mirror of https://github.com/php/php-src.git synced 2026-04-12 18:43:37 +02:00
Files
archived-php-src/ext/standard/tests/network/getprotobynumber_basic.phpt
Matthias Karbe f5afd0a827 Fix bug #80137
Skip getprotobyname() and getprotobynumber() tests on *nix if there
is no /etc/protocols file.

Closes GH-6193.
2020-09-29 10:58:00 +02:00

17 lines
360 B
PHP

--TEST--
getprotobynumber function basic test
--CREDITS--
edgarsandi - <edgar.r.sandi@gmail.com>
--SKIPIF--
<?php
if(in_array(PHP_OS_FAMILY, ['BSD', 'Darwin', 'Solaris', 'Linux'])){
if (!file_exists("/etc/protocols")) die("skip reason: missing /etc/protocols");
}
?>
--FILE--
<?php
var_dump(getprotobynumber(6));
?>
--EXPECT--
string(3) "tcp"