Annotation of embedaddon/php/ext/sqlite/tests/sqlite_popen_basic.phpt, revision 1.1

1.1     ! misho       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: 
        !            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--
        !            25: resource(%d) of type (sqlite database (persistent))
        !            26: resource(%d) of type (sqlite database (persistent))
        !            27: bool(true)

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>