3v4l.org

run code in 300+ PHP versions simultaneously
<?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 git.master, git.master_jit, rfc.property-hooks
Fatal error: Uncaught Error: Call to undefined function mysql_connect() in /in/nEYl3:3 Stack trace: #0 {main} thrown in /in/nEYl3 on line 3
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:
35.73 ms | 401 KiB | 8 Q