diff options
Diffstat (limited to 'ext/standard/tests/general_functions/getservbyname_basic.phpt')
-rwxr-xr-x | ext/standard/tests/general_functions/getservbyname_basic.phpt | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/ext/standard/tests/general_functions/getservbyname_basic.phpt b/ext/standard/tests/general_functions/getservbyname_basic.phpt new file mode 100755 index 0000000000..164e71afd4 --- /dev/null +++ b/ext/standard/tests/general_functions/getservbyname_basic.phpt @@ -0,0 +1,31 @@ +--TEST-- +Test function getservbyport() by calling it more than or less than its expected arguments +--CREDITS-- +Italian PHP TestFest 2009 Cesena 19-20-21 june +Fabio Fabbrucci (fabbrucci@grupporetina.com) +Michele Orselli (mo@ideato.it) +Simone Gentili (sensorario@gmail.com) +--FILE-- +<?php + + $services = array('http', 'ftp', 'ssh', 'telnet', 'imap', 'smtp', 'nicname', 'gopher', 'finger', 'pop3', 'www'); + + foreach ($services as $service) { + $port = getservbyname($service, 'tcp'); + var_dump($port); + } + + +?> +--EXPECTF-- +int(%d) +int(%d) +int(%d) +int(%d) +int(%d) +int(%d) +int(%d) +int(%d) +int(%d) +int(%d) +int(%d) |