3v4l.org

run code in 300+ PHP versions simultaneously
<?php $connection = new PDO('sqlite::memory:'); $connection->exec('CREATE TABLE transactions (id INTEGER, amount NUMERIC, date TEXT)'); $stmt = $connection->query('SELECT * FROM transactions'); var_dump($stmt->columnCount(), $stmt->getColumnMeta(0), $stmt->getColumnMeta(1), $stmt->getColumnMeta(2));
Output for git.master, git.master_jit, rfc.property-hooks
int(3) array(8) { ["native_type"]=> string(4) "null" ["pdo_type"]=> int(0) ["sqlite:decl_type"]=> string(7) "INTEGER" ["table"]=> string(12) "transactions" ["flags"]=> array(0) { } ["name"]=> string(2) "id" ["len"]=> int(-1) ["precision"]=> int(0) } array(8) { ["native_type"]=> string(4) "null" ["pdo_type"]=> int(0) ["sqlite:decl_type"]=> string(7) "NUMERIC" ["table"]=> string(12) "transactions" ["flags"]=> array(0) { } ["name"]=> string(6) "amount" ["len"]=> int(-1) ["precision"]=> int(0) } array(8) { ["native_type"]=> string(4) "null" ["pdo_type"]=> int(0) ["sqlite:decl_type"]=> string(4) "TEXT" ["table"]=> string(12) "transactions" ["flags"]=> array(0) { } ["name"]=> string(4) "date" ["len"]=> int(-1) ["precision"]=> int(0) }

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:
41.48 ms | 403 KiB | 8 Q