3v4l.org

run code in 300+ PHP versions simultaneously
<?php $var = 'http://sandbox.case-store.ch/images/27-12-2014 13-50-47.png'; $var2 = 'sandbox.case-store.ch/images/27-12-2014 13-50-47.png'; function getImageContentRaw($url) { try { echo 'Stage0'; return file_get_contents(rawurlencode($url)); } catch (PHPException $ex) { // Ignore error and try http and https prefix } if (substr($url, 0, 7) === 'http://' || substr($url, 0, 7) === 'https://') { echo 'Stage9'; return false; } try { echo 'Stage1'; return file_get_contents(urlencode('https://'.$url)); } catch (PHPException $ex) { // Ignore error } try { echo 'Stage2'; return file_get_contents(urlencode('http://' . $url)); } catch (PHPException $ex) { // Ignore error } echo 'Stage8'; return false; } var_dump(getImageContentRaw($var)); var_dump(getImageContentRaw($var2));
Output for git.master, git.master_jit, rfc.property-hooks
Stage0 Warning: file_get_contents(): open_basedir restriction in effect. File(http%3A%2F%2Fsandbox.case-store.ch%2Fimages%2F27-12-2014%2013-50-47.png) is not within the allowed path(s): (/tmp:/in:/etc) in /in/f0AO2 on line 9 Warning: file_get_contents(http%3A%2F%2Fsandbox.case-store.ch%2Fimages%2F27-12-2014%2013-50-47.png): Failed to open stream: Operation not permitted in /in/f0AO2 on line 9 bool(false) Stage0 Warning: file_get_contents(): open_basedir restriction in effect. File(sandbox.case-store.ch%2Fimages%2F27-12-2014%2013-50-47.png) is not within the allowed path(s): (/tmp:/in:/etc) in /in/f0AO2 on line 9 Warning: file_get_contents(sandbox.case-store.ch%2Fimages%2F27-12-2014%2013-50-47.png): Failed to open stream: Operation not permitted in /in/f0AO2 on line 9 bool(false)

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
51.92 ms | 403 KiB | 8 Q