run code in 150+ php & hhvm versions
Bugs & Features
Kimberlys-MacBook-Pro-4:~ Kim$ ls Applications in progress.txt Desktop index.html Documents informedconsent.php Downloads libtool Dropbox makechange.py Google Drive mkmf.log HAYststem.dia newref-mpgraph.mp HAYststem.dia~ newref.aux HAYststem.pdf newref.bbl HAYsystem.dia newref.blg HAYsystem.dia~ newref.fdb_latexmk Library newref.log Makefile newref.tex Movies newref.tmp Music newref.tui Pictures newref.tuo PreviousResearch.aux os.c PreviousResearch.synctex.gz parentalconsent.php Public refs.tex Ray Final Exam (Part II).pdf res.cls Ray Final Exam (Parts I & II).pdf scam SVNrep subversion Untitled.txt technicalreport.aux VirtualBox VMs technicalreport.log assignment1 technicalreport.pdf backblue.gif technicalreport.synctex.gz bin technicalreport.synctex.gz(busy) config.log technicalreport.tex config.nice test config.status test.c consentnotification.php test.py doesnotconsent.php tools fade.gif website hts-cache wii.cs.colorado.edu hts-log.txt Kimberlys-MacBook-Pro-4:~ Kim$ vi edit_activity.php Kimberlys-MacBook-Pro-4:~ Kim$ cd .. Kimberlys-MacBook-Pro-4:Users Kim$ cd .. Kimberlys-MacBook-Pro-4:/ Kim$ cd Applications/ Kimberlys-MacBook-Pro-4:Applications Kim$ cd MAMP/htdocs/goal_pages/ Kimberlys-MacBook-Pro-4:goal_pages Kim$ vi edit_activity.php <?php // connect to the database $link = mysql_connect('localhost','root','root'); mysql_select_db("goal_database",$link); function editActivity() { $response = array(); if (isset$_POST("aid")) { $aid = intval($_POST["aid"]); $query = "Update Activities SET ExerciseID=14 WHERE ActivityID='$aid';"; $result = mysql_query($query) or die(mysql_error()); if ($result) { $response["error"] = false; $response["message"] = "Activity updated successfully!"; } else { $response["error"] = true; $response["message"] = "Failed to update activity!"; } } else { $response["error"] = true; $response["message"] = "Things are missing!"; } // echo json response echo json_encode($response); } editActivity();
Output for 5.4.0 - 5.4.25
Parse error: syntax error, unexpected '$_POST' (T_VARIABLE), expecting '(' in /in/gCl2o on line 51
Process exited with code 255.
Output for 5.3.0 - 5.3.28
Parse error: syntax error, unexpected T_VARIABLE, expecting '(' in /in/gCl2o on line 51
Process exited with code 255.