3v4l.org

run code in 300+ PHP versions simultaneously
<?php $pdo = new pdo( 'sqlite::memory:', null, null, [ PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION, PDO::ATTR_EMULATE_PREPARES => false, PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_GROUP | PDO::FETCH_FUNC ] ); $pdo->exec('create table x(group int, foo text, bar text)'); $pdo->exec("insert into x(group, foo, bar) values (1, 'a', 'b'), (1, 'c', 'd'), (2, 'e', 'f')"); $pdo->query('select * from x') ->fetchAll(PDO::FETCH_GROUP | PDO::FETCH_FUNC, function () { var_dump(func_get_args()); });
Output for git.master, git.master_jit, rfc.property-hooks
Fatal error: Uncaught PDOException: SQLSTATE[HY000]: General error: 1 near "group": syntax error in /in/etHAD:13 Stack trace: #0 /in/etHAD(13): PDO->exec('create table x(...') #1 {main} thrown in /in/etHAD on line 13
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:
56.13 ms | 401 KiB | 8 Q