3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php if ((($_FILES["file"]["size"] < 20000) )) { if ($_FILES["file"]["error"] > 0) { echo "Return Code: " . $_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 "Temp file: " . $_FILES["file"]["tmp_name"] . "<br>"; if (file_exists("upload/" . $_FILES["file"]["name"])) { echo $_FILES["file"]["name"] . " already exists. Please rename the file and try again."; } else { move_uploaded_file($_FILES["file"]["tmp_name"], "/home/a5405761/public_html/i/" . $_FILES["file"]["name"]); echo "Stored in: " . "/i/" . $_FILES["file"]["name"]; } } } else { echo "Invalid file."; } ?>
Output for 5.3.0 - 7.1.0
Notice: Undefined index: file in /in/gHe4A on line 2 Notice: Undefined index: file in /in/gHe4A on line 4 Notice: Undefined index: file in /in/gHe4A on line 10 Upload: <br> Notice: Undefined index: file in /in/gHe4A on line 11 Type: <br> Notice: Undefined index: file in /in/gHe4A on line 12 Size: 0 kB<br> Notice: Undefined index: file in /in/gHe4A on line 13 Temp file: <br> Notice: Undefined index: file in /in/gHe4A on line 15 Notice: Undefined index: file in /in/gHe4A on line 21 Notice: Undefined index: file in /in/gHe4A on line 22 Notice: Undefined index: file in /in/gHe4A on line 23 Stored in: /i/
Output for 4.3.0 - 5.2.17
Notice: Undefined index: file in /in/gHe4A on line 2 Notice: Undefined index: file in /in/gHe4A on line 4 Notice: Undefined index: file in /in/gHe4A on line 10 Upload: <br> Notice: Undefined index: file in /in/gHe4A on line 11 Type: <br> Notice: Undefined index: file in /in/gHe4A on line 12 Size: 0 kB<br> Notice: Undefined index: file in /in/gHe4A on line 13 Temp file: <br> Notice: Undefined index: file in /in/gHe4A on line 15 Notice: Undefined index: file in /in/gHe4A on line 21 Notice: Undefined index: file in /in/gHe4A on line 22 Notice: Undefined index: file in /in/gHe4A on line 23 Stored in: /i/