3v4l.org

run code in 300+ PHP versions simultaneously
<?php if(isset($_POST["submit"])){ if($_POST['formsend']==0){ if($_POST["user"]!="" && $_POST["email"]!="" && $_POST["message"]!=""){ $file=fopen("database.txt","a+"); fwrite($file,$_POST["user"]." ".$_POST["email"]." ".$POST["message"]."\r\n"); fclose($file); } } } ?> <?php $file1=fopen("database.txt","r"); while(!feof($file1)) { echo fgets($file1). "<br> "; } fclose($file1); ?>
Output for git.master, git.master_jit
Warning: fopen(): open_basedir restriction in effect. File(database.txt) is not within the allowed path(s): (/tmp:/in:/etc) in /in/I47QF on line 15 Warning: fopen(database.txt): Failed to open stream: Operation not permitted in /in/I47QF on line 15 Fatal error: Uncaught TypeError: feof(): Argument #1 ($stream) must be of type resource, bool given in /in/I47QF:16 Stack trace: #0 /in/I47QF(16): feof(false) #1 {main} thrown in /in/I47QF on line 16
Process exited with code 255.
Output for rfc.property-hooks
Warning: fopen(): open_basedir restriction in effect. File(database.txt) is not within the allowed path(s): (/tmp:/in:/etc) in /in/I47QF on line 15 Warning: fopen(database.txt): Failed to open stream: Operation not permitted in /in/I47QF on line 15 Fatal error: Uncaught TypeError: feof(): Argument #1 ($stream) must be of type resource, false given in /in/I47QF:16 Stack trace: #0 /in/I47QF(16): feof(false) #1 {main} thrown in /in/I47QF on line 16
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:
49.46 ms | 401 KiB | 8 Q