1--TEST--
2SQLite: 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
13	$db1 = sqlite_popen(":memory:");
14	$db2 = sqlite_popen(":memory:");
15
16	var_dump($db1);
17	var_dump($db2);
18
19	list($resourceId1) = sscanf((string) $db1, "resource(%d) of type (sqlite database (persistent))");
20	list($resourceId2) = sscanf((string) $db2, "resource(%d) of type (sqlite database (persistent))");
21
22	var_dump($resourceId1 === $resourceId2);
23?>
24--EXPECTF--
25resource(%d) of type (sqlite database (persistent))
26resource(%d) of type (sqlite database (persistent))
27bool(true)
28