3v4l.org

run code in 300+ PHP versions simultaneously
<?php $uri='http://www.yodlecareers.com/puzzles/triangle.txt'; //$uri='input.txt'; //$file = fopen($uri,'r'); //var_dump($file);die; $rows = file($uri, FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES); echo count($rows)."\n\n"; var_dump($rows[4]);
Output for 8.3.0 - 8.3.6
Warning: file(): php_network_getaddresses: getaddrinfo for www.yodlecareers.com failed: System error in /in/KuhdY on line 9 Warning: file(http://www.yodlecareers.com/puzzles/triangle.txt): Failed to open stream: php_network_getaddresses: getaddrinfo for www.yodlecareers.com failed: System error in /in/KuhdY on line 9 Fatal error: Uncaught TypeError: count(): Argument #1 ($value) must be of type Countable|array, false given in /in/KuhdY:10 Stack trace: #0 {main} thrown in /in/KuhdY on line 10
Process exited with code 255.
Output for 8.1.0 - 8.1.28, 8.2.0 - 8.2.18
Warning: file(): php_network_getaddresses: getaddrinfo for www.yodlecareers.com failed: System error in /in/KuhdY on line 9 Warning: file(http://www.yodlecareers.com/puzzles/triangle.txt): Failed to open stream: php_network_getaddresses: getaddrinfo for www.yodlecareers.com failed: System error in /in/KuhdY on line 9 Fatal error: Uncaught TypeError: count(): Argument #1 ($value) must be of type Countable|array, bool given in /in/KuhdY:10 Stack trace: #0 {main} thrown in /in/KuhdY on line 10
Process exited with code 255.
Output for 8.0.13 - 8.0.30
Warning: file(): php_network_getaddresses: getaddrinfo failed: System error in /in/KuhdY on line 9 Warning: file(http://www.yodlecareers.com/puzzles/triangle.txt): Failed to open stream: php_network_getaddresses: getaddrinfo failed: System error in /in/KuhdY on line 9 Fatal error: Uncaught TypeError: count(): Argument #1 ($value) must be of type Countable|array, bool given in /in/KuhdY:10 Stack trace: #0 {main} thrown in /in/KuhdY on line 10
Process exited with code 255.
Output for 8.0.10 - 8.0.12
Warning: file(): php_network_getaddresses: getaddrinfo failed: Temporary failure in name resolution in /in/KuhdY on line 9 Warning: file(http://www.yodlecareers.com/puzzles/triangle.txt): Failed to open stream: php_network_getaddresses: getaddrinfo failed: Temporary failure in name resolution in /in/KuhdY on line 9 Fatal error: Uncaught TypeError: count(): Argument #1 ($value) must be of type Countable|array, bool given in /in/KuhdY:10 Stack trace: #0 {main} thrown in /in/KuhdY on line 10
Process exited with code 255.
Output for 8.0.0 - 8.0.9
Warning: file(): php_network_getaddresses: getaddrinfo failed: Temporary failure in name resolution in /in/KuhdY on line 9 Warning: file(http://www.yodlecareers.com/puzzles/triangle.txt): Failed to open stream: php_network_getaddresses: getaddrinfo failed: Temporary failure in name resolution in /in/KuhdY on line 9 Fatal error: Uncaught TypeError: count(): Argument #1 ($var) must be of type Countable|array, bool given in /in/KuhdY:10 Stack trace: #0 {main} thrown in /in/KuhdY on line 10
Process exited with code 255.
Output for 7.4.0, 7.4.26 - 7.4.33
Warning: file(): php_network_getaddresses: getaddrinfo failed: System error in /in/KuhdY on line 9 Warning: file(http://www.yodlecareers.com/puzzles/triangle.txt): failed to open stream: php_network_getaddresses: getaddrinfo failed: System error in /in/KuhdY on line 9 Warning: count(): Parameter must be an array or an object that implements Countable in /in/KuhdY on line 10 1 Notice: Trying to access array offset on value of type bool in /in/KuhdY on line 11 NULL
Output for 7.4.3 - 7.4.25
Warning: file(): php_network_getaddresses: getaddrinfo failed: Temporary failure in name resolution in /in/KuhdY on line 9 Warning: file(http://www.yodlecareers.com/puzzles/triangle.txt): failed to open stream: php_network_getaddresses: getaddrinfo failed: Temporary failure in name resolution in /in/KuhdY on line 9 Warning: count(): Parameter must be an array or an object that implements Countable in /in/KuhdY on line 10 1 Notice: Trying to access array offset on value of type bool in /in/KuhdY on line 11 NULL
Output for 7.2.0 - 7.2.25, 7.3.0 - 7.3.12, 7.3.32 - 7.3.33
Warning: file(): php_network_getaddresses: getaddrinfo failed: System error in /in/KuhdY on line 9 Warning: file(http://www.yodlecareers.com/puzzles/triangle.txt): failed to open stream: php_network_getaddresses: getaddrinfo failed: System error in /in/KuhdY on line 9 Warning: count(): Parameter must be an array or an object that implements Countable in /in/KuhdY on line 10 1 NULL
Output for 7.2.29 - 7.2.33, 7.3.16 - 7.3.31
Warning: file(): php_network_getaddresses: getaddrinfo failed: Temporary failure in name resolution in /in/KuhdY on line 9 Warning: file(http://www.yodlecareers.com/puzzles/triangle.txt): failed to open stream: php_network_getaddresses: getaddrinfo failed: Temporary failure in name resolution in /in/KuhdY on line 9 Warning: count(): Parameter must be an array or an object that implements Countable in /in/KuhdY on line 10 1 NULL
Output for 7.0.20, 7.1.5 - 7.1.33
Warning: file(): php_network_getaddresses: getaddrinfo failed: System error in /in/KuhdY on line 9 Warning: file(http://www.yodlecareers.com/puzzles/triangle.txt): failed to open stream: php_network_getaddresses: getaddrinfo failed: System error in /in/KuhdY on line 9 1 NULL
Output for 5.2.6 - 5.2.17, 5.3.0 - 5.3.29, 5.4.0 - 5.4.45, 5.5.0 - 5.5.38, 5.6.0 - 5.6.28, 7.0.0 - 7.0.14, 7.1.0
Warning: file(): php_network_getaddresses: getaddrinfo failed: Name or service not known in /in/KuhdY on line 9 Warning: file(http://www.yodlecareers.com/puzzles/triangle.txt): failed to open stream: php_network_getaddresses: getaddrinfo failed: Name or service not known in /in/KuhdY on line 9 1 NULL
Output for 5.0.3 - 5.0.5, 5.1.0 - 5.1.6, 5.2.0 - 5.2.5
Warning: file(): php_network_getaddresses: getaddrinfo failed: Name or service not known in /in/KuhdY on line 9 Warning: file(http://www.yodlecareers.com/puzzles/triangle.txt): failed to open stream: Connection refused in /in/KuhdY on line 9 1 NULL
Output for 5.0.1 - 5.0.2
Warning: file(): php_network_getaddresses: gethostbyname failed in /in/KuhdY on line 9 Warning: file(http://www.yodlecareers.com/puzzles/triangle.txt): failed to open stream: Success in /in/KuhdY on line 9 1 NULL
Output for 5.0.0
Warning: file(): php_network_getaddresses: gethostbyname failed in /in/KuhdY on line 9 Warning: file(http://www.yodlecareers.com/puzzles/triangle.txt): failed to open stream: Bad file descriptor in /in/KuhdY on line 9 1 NULL
Output for 4.3.3 - 4.3.4, 4.3.10 - 4.3.11, 4.4.0 - 4.4.9
Notice: Use of undefined constant FILE_IGNORE_NEW_LINES - assumed 'FILE_IGNORE_NEW_LINES' in /in/KuhdY on line 9 Notice: Use of undefined constant FILE_SKIP_EMPTY_LINES - assumed 'FILE_SKIP_EMPTY_LINES' in /in/KuhdY on line 9 Warning: file(): php_network_getaddresses: getaddrinfo failed: Name or service not known in /in/KuhdY on line 9 Warning: file(http://www.yodlecareers.com/puzzles/triangle.txt): failed to open stream: Connection refused in /in/KuhdY on line 9 1 NULL
Output for 4.3.5 - 4.3.9
Notice: Use of undefined constant FILE_IGNORE_NEW_LINES - assumed 'FILE_IGNORE_NEW_LINES' in /in/KuhdY on line 9 Notice: Use of undefined constant FILE_SKIP_EMPTY_LINES - assumed 'FILE_SKIP_EMPTY_LINES' in /in/KuhdY on line 9 Warning: file(): php_network_getaddresses: gethostbyname failed in /in/KuhdY on line 9 Warning: file(http://www.yodlecareers.com/puzzles/triangle.txt): failed to open stream: Success in /in/KuhdY on line 9 1 NULL
Output for 4.3.2
Notice: Use of undefined constant FILE_IGNORE_NEW_LINES - assumed 'FILE_IGNORE_NEW_LINES' in /in/KuhdY on line 9 Notice: Use of undefined constant FILE_SKIP_EMPTY_LINES - assumed 'FILE_SKIP_EMPTY_LINES' in /in/KuhdY on line 9 Warning: file(): 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/KuhdY on line 9 Warning: file(http://www.yodlecareers.com/puzzles/triangle.txt): failed to open stream: Connection refused in /in/KuhdY on line 9 1 NULL
Output for 4.3.0 - 4.3.1
Notice: Use of undefined constant FILE_IGNORE_NEW_LINES - assumed 'FILE_IGNORE_NEW_LINES' in /in/KuhdY on line 9 Notice: Use of undefined constant FILE_SKIP_EMPTY_LINES - assumed 'FILE_SKIP_EMPTY_LINES' in /in/KuhdY on line 9 Warning: file() [http://www.php.net/function.file]: php_network_getaddresses: getaddrinfo failed: Name or service not known in /in/KuhdY on line 9 Warning: file(http://www.yodlecareers.com/puzzles/triangle.txt) [http://www.php.net/function.file]: failed to create stream: Connection refused in /in/KuhdY on line 9 1 NULL

preferences:
270.71 ms | 402 KiB | 386 Q