mirror of
https://github.com/php/php-src.git
synced 2024-10-16 05:52:36 +00:00
30 lines
517 B
Plaintext
30 lines
517 B
Plaintext
|
--TEST--
|
||
|
Test function getservbyname() by substituting argument 1 with int values.
|
||
|
--FILE--
|
||
|
<?php
|
||
|
|
||
|
|
||
|
echo "*** Test substituting argument 1 with int values ***\n";
|
||
|
|
||
|
$protocol = "tcp";
|
||
|
|
||
|
|
||
|
$variation_array = array (
|
||
|
'int 0' => 0,
|
||
|
'int 1' => 1,
|
||
|
'int 12345' => 12345,
|
||
|
'int -12345' => -2345,
|
||
|
);
|
||
|
|
||
|
|
||
|
foreach ( $variation_array as $var ) {
|
||
|
var_dump(getservbyname( $var , $protocol ) );
|
||
|
}
|
||
|
?>
|
||
|
--EXPECTF--
|
||
|
*** Test substituting argument 1 with int values ***
|
||
|
bool(false)
|
||
|
bool(false)
|
||
|
bool(false)
|
||
|
bool(false)
|