3v4l.org

run code in 300+ PHP versions simultaneously
<?php var_dump(ini_get('open_basedir')); var_dump(ini_set('open_basedir', '/tmp:/in:/etc:/usr')); # doesn't work var_dump(ini_get('open_basedir')); chdir('/tmp'); if (!is_dir('/tmp/a')) mkdir('/tmp/a/b/c/d/e/f/g/',0777,TRUE); else { unlink('foo'); unlink('bar'); } symlink('/tmp/a/b/c/d/e/f/g','foo'); ini_set('open_basedir','/tmp:bar/'); symlink('foo/../../../../../../','bar'); unlink('foo'); symlink('/tmp/','foo'); echo file_get_contents('bar/usr/share/doc/pcre/LICENCE');
Output for git.master_jit, git.master, rfc.property-hooks
string(13) "/tmp:/in:/etc" bool(false) string(13) "/tmp:/in:/etc" Warning: file_get_contents(bar/usr/share/doc/pcre/LICENCE): Failed to open stream: No such file or directory in /in/75AX0 on line 21

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:
49.98 ms | 401 KiB | 8 Q