3v4l.org

run code in 300+ PHP versions simultaneously
<?php //set up the database connection $servername = "192.129.1.209"; $username = "meaadmin"; $password = "Kasten_15&"; $dbname = "typo3mea"; $dataurl = "http://127.0.0.1:8000/api/thesis?format=json"; // Create connection $conn = new mysqli($servername, $username, $password, $dbname); // Check connection if ($conn->connect_error) { die("Connection failed: " . $conn->connect_error); } //read the json file content $jsondata = file_get_contents($dataurl); //convert json object to php array $data = json_decode($jsondata, true); echo file_get_contents($dataurl); if (empty($data)) { echo "empty"; } $b = count($data); echo $b; //insert into mysql table foreach($data->objects as $obj) { $sql = "INSERT INTO mea_thesis(title) VALUES('".$obj->title."')"; if ($conn->query($sql) === TRUE) { echo "New record created successfully"; } else { echo "Error: " . $sql . "<br>" . $conn->error; } } echo "test"; $conn->close(); echo file_get_contents("http://google.com"); //echo phpinfo(); ?>
Output for git.master, git.master_jit, rfc.property-hooks
Fatal error: Uncaught Error: Class "mysqli" not found in /in/s2Qal:10 Stack trace: #0 {main} thrown in /in/s2Qal on line 10
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:
42.47 ms | 401 KiB | 8 Q