3v4l.org

run code in 300+ PHP versions simultaneously
<?php $pdo = new PDO("sqlite::memory:"); $pdo->query("CREATE TABLE test (id int, value text)"); $pdo->query("INSERT INTO test VALUES (1, 'value')"); $stmt = $pdo->prepare("SELECT * FROM test WHERE id=1"); $stmt->execute(); $row = $stmt->fetch(PDO::FETCH_LAZY); print_r(get_object_vars($row)); foreach ($row as $key => $value) { echo "$key = $value\n"; } echo "\$row->value = {$row->value}\n";
Output for git.master, git.master_jit, rfc.property-hooks
Array ( ) $row->value = value

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:
31.87 ms | 405 KiB | 5 Q