3v4l.org

run code in 300+ PHP versions simultaneously
<?php // Move the temporary uploaded file to its final location, // it should be available at the location "/tmp/boxed/success/agentSvcfRiuOSj5em1t.pdf". $path = '/tmp/boxed/success/'; $mimes = [ 'application/pdf', 'application/x-pdf' ]; $file = $_FILES['agentSvcfRiuOSj5em1t.pdf']; $fileName = $file['name']; if (file_exists($file['name'])) { throw new \Exception('file does not exist'); } if (in_array($mimes,$file['mime'])) { throw new \Exception('mime type not allowed'); } do_move($file['name'], $path.$fileName); ?>
Output for git.master_jit, git.master, rfc.property-hooks
Warning: Undefined array key "agentSvcfRiuOSj5em1t.pdf" in /in/NYPTV on line 13 Warning: Trying to access array offset on null in /in/NYPTV on line 14 Warning: Trying to access array offset on null in /in/NYPTV on line 16 Deprecated: file_exists(): Passing null to parameter #1 ($filename) of type string is deprecated in /in/NYPTV on line 16 Warning: Trying to access array offset on null in /in/NYPTV on line 20 Fatal error: Uncaught TypeError: in_array(): Argument #2 ($haystack) must be of type array, null given in /in/NYPTV:20 Stack trace: #0 /in/NYPTV(20): in_array(Array, NULL) #1 {main} thrown in /in/NYPTV on line 20
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:
47.01 ms | 402 KiB | 8 Q