3v4l.org

run code in 300+ PHP versions simultaneously
<?php print <<<EOF <!DOCTYPE html><META http-equiv="Content-Type" content="text/html; charset=UTF-8"><head> <link rel="shortcut icon" href="../img/bla.gif"/><title>ゴミ箱</title><body> EOF; $res_dir = opendir( '.' ); while( $file_name = readdir( $res_dir ) ){ if($file_name == "index.php"){ }else { if($file_name == "."){ }else { if($file_name == ".."){ }else { print <<<EOF <li><a href="./$file_name">$file_name</a></li> EOF; } } } } closedir( $res_dir ); print <<<EOF </body></html> EOF; ?>
Output for git.master, git.master_jit
<!DOCTYPE html><META http-equiv="Content-Type" content="text/html; charset=UTF-8"><head> <link rel="shortcut icon" href="../img/bla.gif"/><title>ゴミ箱</title><body> Warning: opendir(): open_basedir restriction in effect. File(.) is not within the allowed path(s): (/tmp:/in:/etc) in /in/AVRh7 on line 6 Warning: opendir(.): Failed to open directory: Operation not permitted in /in/AVRh7 on line 6 Fatal error: Uncaught TypeError: readdir(): Argument #1 ($dir_handle) must be of type resource or null, bool given in /in/AVRh7:7 Stack trace: #0 /in/AVRh7(7): readdir(false) #1 {main} thrown in /in/AVRh7 on line 7
Process exited with code 255.
Output for rfc.property-hooks
<!DOCTYPE html><META http-equiv="Content-Type" content="text/html; charset=UTF-8"><head> <link rel="shortcut icon" href="../img/bla.gif"/><title>ゴミ箱</title><body> Warning: opendir(): open_basedir restriction in effect. File(.) is not within the allowed path(s): (/tmp:/in:/etc) in /in/AVRh7 on line 6 Warning: opendir(.): Failed to open directory: Operation not permitted in /in/AVRh7 on line 6 Fatal error: Uncaught TypeError: readdir(): Argument #1 ($dir_handle) must be of type resource or null, false given in /in/AVRh7:7 Stack trace: #0 /in/AVRh7(7): readdir(false) #1 {main} thrown in /in/AVRh7 on line 7
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:
51.05 ms | 401 KiB | 8 Q