Download src/php/php-src/ext/pdo_firebird/tests/execute_block.phpt from meddyrat/dis-bench: direct link, hf CLI and curl.
- Browser
- Download file 662 Bytes
-
https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/ext/pdo_firebird/tests/execute_block.phpt
- Command line
-
hf download hf://datasets/meddyrat/dis-bench/src/php/php-src/ext/pdo_firebird/tests/execute_block.phpt
-
curl -L -o execute_block.phpt https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/ext/pdo_firebird/tests/execute_block.phpt
662 Bytes
| --TEST-- | |
| PDO_Firebird: support EXECUTE BLOCK | |
| --EXTENSIONS-- | |
| pdo_firebird | |
| --SKIPIF-- | |
| require('skipif.inc'); | |
| --FILE-- | |
| require("testdb.inc"); | |
| $dbh = getDbConnection(); | |
| $dbh->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_WARNING); | |
| $sql = ' | |
| execute block (a int = :e, b int = :d) | |
| returns (N int, M int) | |
| as | |
| declare z int; | |
| begin | |
| select 10 | |
| from rdb$database | |
| into :z; | |
| n = a + b + z; | |
| m = z * a; | |
| suspend; | |
| end | |
| '; | |
| $query = $dbh->prepare($sql); | |
| $query->execute(['d' => 1, 'e' => 2]); | |
| $row = $query->fetch(\PDO::FETCH_OBJ); | |
| var_dump($row->N); | |
| var_dump($row->M); | |
| unset($query); | |
| unset($dbh); | |
| echo "done\n"; | |
| --EXPECT-- | |
| int(13) | |
| int(20) | |
| done | |