3v4l.org

run code in 300+ PHP versions simultaneously
<?php AjaxHelper::add_action('resume_download', function () { AjaxHelper::verify_nonce(); $resumes = isset($_POST['resumes']) ? (array)$_POST['resumes'] : []; $files = []; if (count($resumes) > 0) { foreach ($resumes as $resume) { $resume_file_id = get_post_meta( $resume, 'resume_file', true ); if (!empty($resume_file_id)) { $files[] = get_attached_file($resume_file_id); } } } header('Pragma: public'); header('Accept-Ranges: bytes'); header('Expires: 0'); header('Cache-Control: must-revalidate, post-check=0, pre-check=0'); header('Content-Disposition: attachment; filename="archive.zip"'); header('Content-Type: application/octet-stream'); $fp = popen('zip -j -q -r - ' . implode(' ', array_map('escapeshellarg', $files)), 'r'); $bufsize = 8192; $buff = ''; while (!feof($fp)) { echo fread($fp, $bufsize); } pclose($fp); // AjaxHelper::show_data(['success' => true, 'file' => $result]); });
Output for 8.0.0 - 8.0.30, 8.1.0 - 8.1.28, 8.2.0 - 8.2.18, 8.3.0 - 8.3.4, 8.3.6
Fatal error: Uncaught Error: Class "AjaxHelper" not found in /in/JTYgU:4 Stack trace: #0 {main} thrown in /in/JTYgU on line 4
Process exited with code 255.
Output for 8.3.5
Warning: PHP Startup: Unable to load dynamic library 'sodium.so' (tried: /usr/lib/php/8.3.5/modules/sodium.so (libsodium.so.23: cannot open shared object file: No such file or directory), /usr/lib/php/8.3.5/modules/sodium.so.so (/usr/lib/php/8.3.5/modules/sodium.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0 Fatal error: Uncaught Error: Class "AjaxHelper" not found in /in/JTYgU:4 Stack trace: #0 {main} thrown in /in/JTYgU on line 4
Process exited with code 255.
Output for 7.0.0 - 7.0.20, 7.1.0 - 7.1.25, 7.2.0 - 7.2.33, 7.3.0 - 7.3.33, 7.4.0 - 7.4.33
Fatal error: Uncaught Error: Class 'AjaxHelper' not found in /in/JTYgU:4 Stack trace: #0 {main} thrown in /in/JTYgU on line 4
Process exited with code 255.

preferences:
146.33 ms | 402 KiB | 188 Q