bug70221.phpt 506 B

1234567891011121314151617181920
  1. --TEST--
  2. Bug #70221 (persistent sqlite connection + custom function segfaults)
  3. --EXTENSIONS--
  4. pdo_sqlite
  5. --FILE--
  6. <?php
  7. $dbfile = __DIR__ . '/test.sqlite';
  8. $db = new PDO('sqlite:'.$dbfile, null, null, array(PDO::ATTR_PERSISTENT => true));
  9. function _test() { return 42; }
  10. $db->sqliteCreateFunction('test', '_test', 0);
  11. print("Everything is fine, no exceptions here\n");
  12. unset($db);
  13. ?>
  14. --CLEAN--
  15. <?php
  16. $dbfile = __DIR__ . '/test.sqlite';
  17. unlink($dbfile);
  18. ?>
  19. --EXPECT--
  20. Everything is fine, no exceptions here