Annotation of embedaddon/php/ext/standard/tests/general_functions/getservbyname_basic.phpt, revision 1.1
1.1 ! misho 1: --TEST--
! 2: Test function getservbyname()
! 3: --CREDITS--
! 4: Italian PHP TestFest 2009 Cesena 19-20-21 june
! 5: Fabio Fabbrucci (fabbrucci@grupporetina.com)
! 6: Michele Orselli (mo@ideato.it)
! 7: Simone Gentili (sensorario@gmail.com)
! 8: --FILE--
! 9: <?php
! 10:
! 11: $services = array('http', 'ftp', 'ssh', 'telnet', 'imap', 'smtp', 'nicname', 'gopher', 'finger', 'pop3', 'www');
! 12:
! 13: foreach ($services as $service) {
! 14: $port = getservbyname($service, 'tcp');
! 15: var_dump($port);
! 16: }
! 17:
! 18:
! 19: ?>
! 20: --EXPECTF--
! 21: int(%d)
! 22: int(%d)
! 23: int(%d)
! 24: int(%d)
! 25: int(%d)
! 26: int(%d)
! 27: int(%d)
! 28: int(%d)
! 29: int(%d)
! 30: int(%d)
! 31: int(%d)
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>