1--TEST--
2Test function getservbyname()
3--CREDITS--
4Italian PHP TestFest 2009 Cesena 19-20-21 june
5Fabio Fabbrucci (fabbrucci@grupporetina.com)
6Michele Orselli (mo@ideato.it)
7Simone 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--
21int(%d)
22int(%d)
23int(%d)
24int(%d)
25int(%d)
26int(%d)
27int(%d)
28int(%d)
29int(%d)
30int(%d)
31int(%d)
32