Download src/php/php-src/ext/pdo_sqlite/tests/bug70221.phpt from meddyrat/dis-bench: direct link, hf CLI and curl.
- Browser
- Download file 506 Bytes
-
https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/ext/pdo_sqlite/tests/bug70221.phpt
- Command line
-
hf download hf://datasets/meddyrat/dis-bench/src/php/php-src/ext/pdo_sqlite/tests/bug70221.phpt
-
curl -L -o bug70221.phpt https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/ext/pdo_sqlite/tests/bug70221.phpt
506 Bytes
| --TEST-- | |
| Bug #70221 (persistent sqlite connection + custom function segfaults) | |
| --EXTENSIONS-- | |
| pdo_sqlite | |
| --FILE-- | |
| $dbfile = __DIR__ . '/test.sqlite'; | |
| $db = new PDO('sqlite:'.$dbfile, null, null, array(PDO::ATTR_PERSISTENT => true)); | |
| function _test() { return 42; } | |
| $db->sqliteCreateFunction('test', '_test', 0); | |
| print("Everything is fine, no exceptions here\n"); | |
| unset($db); | |
| --CLEAN-- | |
| $dbfile = __DIR__ . '/test.sqlite'; | |
| unlink($dbfile); | |
| --EXPECT-- | |
| Everything is fine, no exceptions here | |