3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $conf['dl_url'] = 'http://droidphp-repository.herokuapp.com/'; $conf['data'] = '/data/data/org.opendroidphp/'; $conf['file_system'] = '/sdcard/droidphp/'; function getFilesize($url){ $head = array_change_key_case(get_headers($url, TRUE)); return $head['content-length']; } $value[] = [ 'repo_name' => 'Components Security Fix', 'repo_url' => 'https://dl.dropboxusercontent.com/s/ldl3y1tlqodkvfs/data_heartblead_fix.zip?dl=0', 'repo_install_location' => $conf['data'], 'repo_file_size' => getFilesize('https://dl.dropboxusercontent.com/s/ldl3y1tlqodkvfs/data_heartblead_fix.zip?dl=0'), ]; file_put_contents('packages.json', json_encode($value, JSON_PRETTY_PRINT));
Output for 7.1.20, 7.2.6
Warning: get_headers(): Unable to find the wrapper "https" - did you forget to enable it when you configured PHP? in /in/4uo05 on line 8 Warning: get_headers(): This function may only be used against URLs in /in/4uo05 on line 8 Warning: array_change_key_case() expects parameter 1 to be array, boolean given in /in/4uo05 on line 8 Warning: file_put_contents(): open_basedir restriction in effect. File(packages.json) is not within the allowed path(s): (/tmp:/in) in /in/4uo05 on line 19 Warning: file_put_contents(packages.json): failed to open stream: Operation not permitted in /in/4uo05 on line 19
Output for 7.0.20, 7.1.5 - 7.1.7, 7.2.0
Warning: get_headers(): php_network_getaddresses: getaddrinfo failed: System error in /in/4uo05 on line 8 Warning: get_headers(https://dl.dropboxusercontent.com/s/ldl3y1tlqodkvfs/data_heartblead_fix.zip?dl=0): failed to open stream: php_network_getaddresses: getaddrinfo failed: System error in /in/4uo05 on line 8 Warning: array_change_key_case() expects parameter 1 to be array, boolean given in /in/4uo05 on line 8 Warning: file_put_contents(packages.json): failed to open stream: Permission denied in /in/4uo05 on line 19
Output for 5.4.15 - 7.0.14, 7.1.0
Warning: get_headers(): php_network_getaddresses: getaddrinfo failed: Name or service not known in /in/4uo05 on line 8 Warning: get_headers(https://dl.dropboxusercontent.com/s/ldl3y1tlqodkvfs/data_heartblead_fix.zip?dl=0): failed to open stream: php_network_getaddresses: getaddrinfo failed: Name or service not known in /in/4uo05 on line 8 Warning: array_change_key_case() expects parameter 1 to be array, boolean given in /in/4uo05 on line 8 Warning: file_put_contents(packages.json): failed to open stream: Permission denied in /in/4uo05 on line 19
Output for 5.4.0 - 5.4.14
Warning: get_headers(): Unable to find the wrapper "https" - did you forget to enable it when you configured PHP? in /in/4uo05 on line 8 Warning: get_headers(): This function may only be used against URLs in /in/4uo05 on line 8 Warning: array_change_key_case() expects parameter 1 to be array, boolean given in /in/4uo05 on line 8 Warning: file_put_contents(packages.json): failed to open stream: Permission denied in /in/4uo05 on line 19
Output for 4.4.2 - 4.4.9, 5.1.0 - 5.3.29
Parse error: syntax error, unexpected '[' in /in/4uo05 on line 12
Process exited with code 255.
Output for 4.3.0 - 4.3.1, 4.3.5 - 4.4.1, 5.0.0 - 5.0.5
Parse error: parse error, unexpected '[' in /in/4uo05 on line 12
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error in /in/4uo05 on line 12
Process exited with code 255.