1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 16:22:37 +01:00
Files
archived-php-src/ext/pdo_sqlite/tests/bug70221.phpt
Nikita Popov 7485978339 Migrate SKIPIF -> EXTENSIONS (#7138)
This is an automated migration of most SKIPIF extension_loaded checks.
2021-06-11 11:57:42 +02:00

21 lines
506 B
PHP

--TEST--
Bug #70221 (persistent sqlite connection + custom function segfaults)
--EXTENSIONS--
pdo_sqlite
--FILE--
<?php
$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--
<?php
$dbfile = __DIR__ . '/test.sqlite';
unlink($dbfile);
?>
--EXPECT--
Everything is fine, no exceptions here