Download src/php/php-src/ext/pdo_sqlite/tests/bug79664.phpt from meddyrat/dis-bench: direct link, hf CLI and curl.
- Browser
- Download file 526 Bytes
-
https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/ext/pdo_sqlite/tests/bug79664.phpt
- Command line
-
hf download hf://datasets/meddyrat/dis-bench/src/php/php-src/ext/pdo_sqlite/tests/bug79664.phpt
-
curl -L -o bug79664.phpt https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/ext/pdo_sqlite/tests/bug79664.phpt
526 Bytes
| --TEST-- | |
| Bug #79664 (PDOStatement::getColumnMeta fails on empty result set) | |
| --EXTENSIONS-- | |
| pdo_sqlite | |
| --FILE-- | |
| $pdo = new PDO('sqlite::memory:', null, null, [ | |
| PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION, | |
| ]); | |
| $stmt = $pdo->query('select 1 where 0'); | |
| if ($stmt->columnCount()) { | |
| var_dump($stmt->getColumnMeta(0)); | |
| } | |
| --EXPECT-- | |
| array(6) { | |
| ["native_type"]=> | |
| string(4) "null" | |
| ["pdo_type"]=> | |
| int(0) | |
| ["flags"]=> | |
| array(0) { | |
| } | |
| ["name"]=> | |
| string(1) "1" | |
| ["len"]=> | |
| int(-1) | |
| ["precision"]=> | |
| int(0) | |
| } | |