3v4l.org

run code in 300+ PHP versions simultaneously
<?php $posts = $posts = [ [ 'data' => [ 'url' => 'https://hashphp.org', 'author_fullname' => 'alvisleet' ] ], [ 'data' => [ 'url' => 'https://hashphp.org', 'author_fullname' => 'alvisleet' ] ] ]; foreach ($posts as $post) { $fetchedurl = $post['data']['url']; $ids = $post['data']['author_fullname']; $fetchedurl = array($fetchedurl); $stmt = $db->prepare("INSERT INTO data ('fetched_url', 'author') VALUES ('?', '?')"); $db->beginTransaction(); $stmt->execute($fetchedurl); $db->commit(); }
Output for git.master, git.master_jit, rfc.property-hooks
Warning: Undefined variable $db in /in/MbfbG on line 23 Fatal error: Uncaught Error: Call to a member function prepare() on null in /in/MbfbG:23 Stack trace: #0 {main} thrown in /in/MbfbG on line 23
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:
62.97 ms | 401 KiB | 8 Q