3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class abc{ protected const A = [1, 2, 3]; public static function abcd(){ return abc::A; } } print_r(abc::abcd()); $file_url = 'http://www.javatpoint.com/f.txt'; readfile($file_url);
based on 0fn8Y
Output for 7.1.0 - 7.3.0rc4
Array ( [0] => 1 [1] => 2 [2] => 3 ) Warning: readfile(): php_network_getaddresses: getaddrinfo failed: System error in /in/iSjHD on line 21 Warning: readfile(http://www.javatpoint.com/f.txt): failed to open stream: php_network_getaddresses: getaddrinfo failed: System error in /in/iSjHD on line 21
Output for 5.6.38 - 7.0.28
Parse error: syntax error, unexpected 'const' (T_CONST), expecting variable (T_VARIABLE) in /in/iSjHD on line 5
Process exited with code 255.