3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $services = array('http', 'ftp', 'ssh', 'telnet', 'imap', 'smtp', 'nicname', 'gopher', 'finger', 'pop3', 'www'); foreach ($services as $service) { $port = getservbyname($service, 'tcp'); echo $service . ": " . $port . "<br />\n"; }
Output for 4.3.0 - 5.6.22, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
http: 80<br /> ftp: 21<br /> ssh: 22<br /> telnet: 23<br /> imap: 143<br /> smtp: 25<br /> nicname: 43<br /> gopher: 70<br /> finger: 79<br /> pop3: 110<br /> www: 80<br />