3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $ftp_server = 'ftp.cetip.com.br/MediaCDI/'; $connect = ftp_connect($ftp_server); $login_result = ftp_login($connect, '', ''); $contents = ftp_nlist($connect, "."); print_r($contents); /* $files = scandir('ftp://ftp.cetip.com.br/MediaCDI/', SCANDIR_SORT_DESCENDING); $newest_file = $files[0]; $fh = fopen($newest_file, 'r'); echo $fh; */
Output for 7.0.0 - 7.1.0
Fatal error: Uncaught Error: Call to undefined function ftp_connect() in /in/6rP52:4 Stack trace: #0 {main} thrown in /in/6rP52 on line 4
Process exited with code 255.
Output for 5.4.0 - 5.6.28
Fatal error: Call to undefined function ftp_connect() in /in/6rP52 on line 4
Process exited with code 255.
Output for 4.3.3 - 4.3.4, 4.3.10 - 4.4.9, 5.0.3 - 5.3.29
Warning: ftp_connect(): php_network_getaddresses: getaddrinfo failed: Name or service not known in /in/6rP52 on line 4 Warning: ftp_login() expects parameter 1 to be resource, boolean given in /in/6rP52 on line 6 Warning: ftp_nlist() expects parameter 1 to be resource, boolean given in /in/6rP52 on line 8
Output for 4.3.5 - 4.3.9, 5.0.0 - 5.0.2
Warning: ftp_connect(): php_network_getaddresses: gethostbyname failed in /in/6rP52 on line 4 Warning: ftp_login() expects parameter 1 to be resource, boolean given in /in/6rP52 on line 6 Warning: ftp_nlist() expects parameter 1 to be resource, boolean given in /in/6rP52 on line 8
Output for 4.3.2
Warning: ftp_connect(): php_network_getaddresses: getaddrinfo failed: Name or service not known (is your IPV6 configuration correct? If this error happens all the time, try reconfiguring PHP using --disable-ipv6 option to configure) in /in/6rP52 on line 4 Warning: ftp_login() expects parameter 1 to be resource, boolean given in /in/6rP52 on line 6 Warning: ftp_nlist() expects parameter 1 to be resource, boolean given in /in/6rP52 on line 8
Output for 4.3.0 - 4.3.1
Warning: ftp_connect() [http://www.php.net/function.ftp-connect]: php_network_getaddresses: getaddrinfo failed: Name or service not known in /in/6rP52 on line 4 Warning: ftp_login() expects parameter 1 to be resource, boolean given in /in/6rP52 on line 6 Warning: ftp_nlist() expects parameter 1 to be resource, boolean given in /in/6rP52 on line 8