3v4l.org

run code in 300+ PHP versions simultaneously
<?php if ($handle = opendir('var')) { while (false !== ($entry = readdir($handle))) { if ($entry != "." && $entry != "..") { echo "$entry\n"; } } closedir($handle); } $filename = 'index.php'; $file_handle = fopen($filename, 'w'); fwrite($file_handle, '123'); fclose($file_handle);
Output for git.master, git.master_jit
Warning: opendir(): open_basedir restriction in effect. File(var) is not within the allowed path(s): (/tmp:/in:/etc) in /in/V8J7l on line 2 Warning: opendir(var): Failed to open directory: Operation not permitted in /in/V8J7l on line 2 Warning: fopen(): open_basedir restriction in effect. File(index.php) is not within the allowed path(s): (/tmp:/in:/etc) in /in/V8J7l on line 11 Warning: fopen(index.php): Failed to open stream: Operation not permitted in /in/V8J7l on line 11 Fatal error: Uncaught TypeError: fwrite(): Argument #1 ($stream) must be of type resource, bool given in /in/V8J7l:12 Stack trace: #0 /in/V8J7l(12): fwrite(false, '123') #1 {main} thrown in /in/V8J7l on line 12
Process exited with code 255.
Output for rfc.property-hooks
Warning: opendir(): open_basedir restriction in effect. File(var) is not within the allowed path(s): (/tmp:/in:/etc) in /in/V8J7l on line 2 Warning: opendir(var): Failed to open directory: Operation not permitted in /in/V8J7l on line 2 Warning: fopen(): open_basedir restriction in effect. File(index.php) is not within the allowed path(s): (/tmp:/in:/etc) in /in/V8J7l on line 11 Warning: fopen(index.php): Failed to open stream: Operation not permitted in /in/V8J7l on line 11 Fatal error: Uncaught TypeError: fwrite(): Argument #1 ($stream) must be of type resource, false given in /in/V8J7l:12 Stack trace: #0 /in/V8J7l(12): fwrite(false, '123') #1 {main} thrown in /in/V8J7l on line 12
Process exited with code 255.

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:
46.54 ms | 402 KiB | 8 Q