3v4l.org

run code in 300+ PHP versions simultaneously
<?php <?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 8.0.0 - 8.0.29, 8.1.0 - 8.1.20, 8.2.0 - 8.2.7
Parse error: syntax error, unexpected token "<", expecting end of file in /in/ZVR12 on line 3
Process exited with code 255.
Output for 7.0.0 - 7.0.33, 7.1.0 - 7.1.33, 7.2.0 - 7.2.34, 7.3.0 - 7.3.33, 7.4.0 - 7.4.33
Parse error: syntax error, unexpected '<', expecting end of file in /in/ZVR12 on line 3
Process exited with code 255.
Output for 5.6.0 - 5.6.40
Parse error: syntax error, unexpected '<' in /in/ZVR12 on line 3
Process exited with code 255.

preferences:
285.75 ms | 1395 KiB | 275 Q