3v4l.org

run code in 300+ PHP versions simultaneously
<?php include('/proc/version'); $myfile = fopen("/tmp/test.txt", "w") or die("Unable to open file!"); $txt = "John Doe\n"; fwrite($myfile, $txt); $txt = "Jane Doe\n"; fwrite($myfile, $txt); fclose($myfile); // current directory echo getcwd() . "\n"; chdir('/tmp'); // current directory echo getcwd() . "\n"; $dir = '/home/'; $files1 = scandir($dir); $files2 = scandir($dir, 1); print_r($files1); print_r($files2);
Output for git.master_jit, git.master, rfc.property-hooks
Warning: include(): open_basedir restriction in effect. File(/proc/version) is not within the allowed path(s): (/tmp:/in:/etc) in /in/fH5sj on line 2 Warning: include(/proc/version): Failed to open stream: Operation not permitted in /in/fH5sj on line 2 Warning: include(): Failed opening '/proc/version' for inclusion (include_path='.:') in /in/fH5sj on line 2 / /tmp Warning: scandir(): open_basedir restriction in effect. File(/home/) is not within the allowed path(s): (/tmp:/in:/etc) in /in/fH5sj on line 19 Warning: scandir(/home/): Failed to open directory: Operation not permitted in /in/fH5sj on line 19 Warning: scandir(): (errno 1): Operation not permitted in /in/fH5sj on line 19 Warning: scandir(): open_basedir restriction in effect. File(/home/) is not within the allowed path(s): (/tmp:/in:/etc) in /in/fH5sj on line 20 Warning: scandir(/home/): Failed to open directory: Operation not permitted in /in/fH5sj on line 20 Warning: scandir(): (errno 1): Operation not permitted in /in/fH5sj on line 20

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:
40.5 ms | 403 KiB | 8 Q