1
0
mirror of https://github.com/php/php-src.git synced 2026-04-21 23:18:13 +02:00
Files
archived-php-src/ext/standard/tests/general_functions/getservbyname_variation7.phpt
T
Gabriel Caruso ded3d984c6 Use EXPECT instead of EXPECTF when possible
EXPECTF logic in run-tests.php is considerable, so let's avoid it.
2018-02-20 21:53:48 +01:00

34 lines
582 B
PHP

--TEST--
Test function getservbyname() by substituting argument 1 with string values.
--FILE--
<?php
echo "*** Test substituting argument 1 with string values ***\n";
$protocol = "tcp";
$heredoc = <<<EOT
hello world
EOT;
$variation_array = array(
'string DQ' => "string",
'string SQ' => 'string',
'mixed case string' => "sTrInG",
'heredoc' => $heredoc,
);
foreach ( $variation_array as $var ) {
var_dump(getservbyname( $var , $protocol ) );
}
?>
--EXPECT--
*** Test substituting argument 1 with string values ***
bool(false)
bool(false)
bool(false)
bool(false)