3v4l.org

run code in 300+ PHP versions simultaneously
<?php /** * Pause Developer Application Script * * This script will submit your resume to Pause's server. * Fix the bugs, fill in the missing code, and run it to apply for the job. * Requires the CURL module to be loaded in your PHP installation. * * Please Note: While this sample test is written in php, we encourage you * to rewrite this code in the language of your choice, we simply require * the submission to our server to match, how you do it is completely up * to you! * * (c) 2013 Pause Productions */ // This should point to the resume file you want to submit. // Note this is a path to the file on your local hard drive, // not the contents of the file. For best results, use PDF, // RTF, DOC, DOCX, or TXT. define('APPLICATION_SERVER', 'http://jobs.pause.ca/submit.php'); $resumefile = 'C:\Users\Ronak\Documents\Ronak\Ronak-Ebrahimpour2014.docx'; // Your full name $name = 'Ronak Ebrahimpour'; // Your phone number $phone = '416 459 6002'; // Your email address $email = 'ronak_e@yahoo.com'; // The message we want to send $subject = 'My developer application'; // Any additional notes you wish to include // Bonus points if you discover the security issue with this script or // have ideas for improvements and note them here. $notes = ''; // Prepare the payload $vars = array("name"=>$name,"phone"=>$phone,"email"=>$email,"subject"=>$subject,"notes"=>$notes,"time"=>time()); $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, APPLICATION_SERVER); curl_setopt($ch, CURLOPT_POSTFIELDS, $vars); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $response = curl_exec($ch); //decode the json encoded response $responseVars = decode($response); $vars['application-id'] = $response['application-id']; $key = $response['application-secret-key']; // You must write the code that generates the signature to sign the application // request. This is very similar to how other web services handle signatures, // so you may be familiar with the process. Here's how to do it: // 1) Sort the $vars array by key $vars = ksort($vars); // 2) Convert the sorted $vars array to an http query string (eg: var1=abc&var2=def) // Note this string should not be prepended with ?, http://, or anything else, // it should look like the example string above... // 3) Concatenate the string from step 2 and $key (string then $key) // 4) Hash the resulting string from step 3 using SHA256. This is your signature. $signature = 'This must be replaced by the code you generate in steps 1,2,3,4)'; // 5) Add the signature to the $vars array as 'sig' (done for you, below) $vars['sig'] = $signature; // Check that the file exists if (!file_exists($resumefile)) { die('ERROR: Cannot find local file '.$resumefile."\n"); } // Add the file to upload $vars['resume'] = '@'.$resumefile; // Include this script (we'd like to see your work please!) $vars['script'] = '@'."I """"__FILE__ not allowed" not allowed" not allowed" not allowed" not allowed"; // Post the data to Pause's server print "Submitting application...\n"; $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, APPLICATION_SERVER); curl_setopt($ch, CURLOPT_POSTFIELDS, $vars); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); $response = curl_exec($ch); // If we got back "OK" then it was submitted successfully. // Otherwise it should tell us what went wrong. if ($response=='OK') { print "Resume sent successfully, thank you for applying!\n"; } else { print "$response\n"; }

Here you find the average performance (time & memory) of each version. A grayed out version indicates it didn't complete successfully (based on exit-code).

VersionSystem time (s)User time (s)Memory (MiB)
5.6.130.0070.05018.18
5.6.120.0070.04021.01
5.6.110.0070.07321.16
5.6.100.0030.08721.00
5.6.90.0030.06021.04
5.6.80.0070.06020.42
5.5.290.0070.05017.94
5.5.280.0000.04720.86
5.5.270.0100.07020.87
5.5.260.0070.06320.86
5.5.250.0030.06020.68
5.5.240.0030.03720.27
5.4.450.0170.06019.32
5.4.440.0170.08319.47
5.4.430.0130.06319.60
5.4.420.0170.06019.62
5.4.410.0300.06719.48
5.4.400.0170.06019.27
5.4.390.0270.05319.01
5.4.380.0200.04718.87
5.4.370.0130.05719.30
5.4.360.0330.06019.15
5.4.350.0070.06019.15
5.4.340.0100.06018.98
5.4.320.0200.05019.15
5.4.310.0170.06019.06
5.4.300.0200.06319.28
5.4.290.0230.05319.25
5.4.280.0130.06019.30
5.4.270.0130.05719.14
5.4.260.0170.05319.38
5.4.250.0170.05319.36
5.4.240.0100.06319.25
5.4.230.0300.04719.03
5.4.220.0130.05719.37
5.4.210.0170.05019.01
5.4.200.0130.05316.77
5.4.190.0130.06019.08
5.4.180.0300.03719.00
5.4.170.0170.07719.02
5.4.160.0100.07318.97
5.4.150.0270.04319.23
5.4.140.0230.07016.56
5.4.130.0200.06716.50
5.4.120.0170.05316.52
5.4.110.0130.05016.70
5.4.100.0230.04716.43
5.4.90.0100.05716.52
5.4.80.0200.04716.31
5.4.70.0230.04716.38
5.4.60.0070.04016.35
5.4.50.0030.07016.50
5.4.40.0230.07316.38
5.4.30.0130.04016.42
5.4.20.0270.04716.51

preferences:
151.86 ms | 1394 KiB | 7 Q