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(sort int, foo text, bar text)'); $pdo->exec("insert into x(sort, 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
array(2) { [0]=> string(1) "a" [1]=> string(1) "b" } array(2) { [0]=> string(1) "c" [1]=> string(1) "d" } array(2) { [0]=> string(1) "e" [1]=> string(1) "f" }

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.72 ms | 401 KiB | 8 Q