3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $file1 = new \SplFileObject('ftp://ftp.nasdaqtrader.com/SymbolDirectory/nasdaqlisted.txt'); while( !$file1->eof() ) { $data = $file1->fgets(); if( !$file1->eof() ){ echo $data; } // second last } // last
based on clqTE
Output for 7.0.4, 7.0.20, 7.1.5 - 7.2.0
Fatal error: Uncaught RuntimeException: SplFileObject::__construct(): php_network_getaddresses: getaddrinfo failed: System error in /in/SnvQ5:2 Stack trace: #0 /in/SnvQ5(2): SplFileObject->__construct('ftp://ftp.nasda...') #1 {main} thrown in /in/SnvQ5 on line 2
Process exited with code 255.
Output for 7.0.0 - 7.0.3, 7.0.5 - 7.0.6, 7.1.0
Fatal error: Uncaught RuntimeException: SplFileObject::__construct(): php_network_getaddresses: getaddrinfo failed: Name or service not known in /in/SnvQ5:2 Stack trace: #0 /in/SnvQ5(2): SplFileObject->__construct('ftp://ftp.nasda...') #1 {main} thrown in /in/SnvQ5 on line 2
Process exited with code 255.
Output for 5.5.24 - 5.5.32, 5.5.34 - 5.6.17, 5.6.20 - 5.6.28
Fatal error: Uncaught exception 'RuntimeException' with message 'SplFileObject::__construct(): php_network_getaddresses: getaddrinfo failed: Name or service not known' in /in/SnvQ5:2 Stack trace: #0 /in/SnvQ5(2): SplFileObject->__construct('ftp://ftp.nasda...') #1 {main} thrown in /in/SnvQ5 on line 2
Process exited with code 255.
Output for 5.3.21 - 5.4.45, 5.5.33, 5.6.18 - 5.6.19
Fatal error: Uncaught exception 'RuntimeException' with message 'SplFileObject::__construct(): php_network_getaddresses: getaddrinfo failed: System error' in /in/SnvQ5:2 Stack trace: #0 /in/SnvQ5(2): SplFileObject->__construct('ftp://ftp.nasda...') #1 {main} thrown in /in/SnvQ5 on line 2
Process exited with code 255.