3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<html> <head> <title></title> </head> <body> <form action="uploader.php" method="post" enctype="multipart/form-data"> <label for="file">Filename:</label> <input type="file" name="file" id="file"><br> <input type="submit" name="submit" value="Submit"> </form> </body> </html> <?php if ($_FILES["file"]["error"] > 0) { echo "Error: " . $_FILES["file"]["error"] . "<br>"; } else { echo "Upload: " . $_FILES["file"]["name"] . "<br>"; echo "Type: " . $_FILES["file"]["type"] . "<br>"; echo "Size: " . ($_FILES["file"]["size"] / 1024) . " kB<br>"; echo "Stored in: " . $_FILES["file"]["tmp_name"]; } ?>
Output for 5.3.0 - 7.1.0
<html> <head> <title></title> </head> <body> <form action="uploader.php" method="post" enctype="multipart/form-data"> <label for="file">Filename:</label> <input type="file" name="file" id="file"><br> <input type="submit" name="submit" value="Submit"> </form> </body> </html> Notice: Undefined index: file in /in/EDv25 on line 15 Notice: Undefined index: file in /in/EDv25 on line 21 Upload: <br> Notice: Undefined index: file in /in/EDv25 on line 22 Type: <br> Notice: Undefined index: file in /in/EDv25 on line 23 Size: 0 kB<br> Notice: Undefined index: file in /in/EDv25 on line 24 Stored in:
Output for 4.3.0 - 5.2.17
<html> <head> <title></title> </head> <body> <form action="uploader.php" method="post" enctype="multipart/form-data"> <label for="file">Filename:</label> <input type="file" name="file" id="file"><br> <input type="submit" name="submit" value="Submit"> </form> </body> </html> Notice: Undefined index: file in /in/EDv25 on line 15 Notice: Undefined index: file in /in/EDv25 on line 21 Upload: <br> Notice: Undefined index: file in /in/EDv25 on line 22 Type: <br> Notice: Undefined index: file in /in/EDv25 on line 23 Size: 0 kB<br> Notice: Undefined index: file in /in/EDv25 on line 24 Stored in: