You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

27 lines
871 B

  1. --TEST--
  2. SQLite: sqlite_popen() basic tests
  3. --SKIPIF--
  4. <?php if (!extension_loaded("sqlite")) print "skip"; ?>
  5. --FILE--
  6. <?php
  7. /* Prototype : resource sqlite_popen(string filename [, int mode [, string &error_message]])
  8. * Description: Opens a persistent handle to a SQLite database. Will create the database if it does not exist.
  9. * Source code: ext/sqlite/sqlite.c
  10. * Alias to functions:
  11. */
  12. $db1 = sqlite_popen(":memory:");
  13. $db2 = sqlite_popen(":memory:");
  14. var_dump($db1);
  15. var_dump($db2);
  16. list($resourceId1) = sscanf((string) $db1, "resource(%d) of type (sqlite database (persistent))");
  17. list($resourceId2) = sscanf((string) $db2, "resource(%d) of type (sqlite database (persistent))");
  18. var_dump($resourceId1 === $resourceId2);
  19. ?>
  20. --EXPECTF--
  21. resource(%d) of type (sqlite database (persistent))
  22. resource(%d) of type (sqlite database (persistent))
  23. bool(true)