Doc #74397 [Opn]: Filename can also be empty string for in-memory db

From: Date: Sun, 09 Apr 2017 15:25:25 +0000
Subject: Doc #74397 [Opn]: Filename can also be empty string for in-memory db
References: 1  Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-14601@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=74397&edit=1 ID: 74397 User updated by: aarjan at hotmail dot com Reported by: aarjan at hotmail dot com -Summary: Filename be now also be empty string for in-memory db +Summary: Filename can also be empty string for in-memory db Status: Open Type: Documentation Problem Package: SQLite related Operating System: Windows PHP Version: 7.0.17 Block user comment: N Private report: N New Comment: Typo fix in summary Previous Comments: ------------------------------------------------------------------------ [2017-04-09 15:22:03] aarjan at hotmail dot com Description: ------------ --- From manual page: http://www.php.net/sqlite3.construct --- https://github.com/php/php-src/commit/cc125f277b50e0f90fc8033fe7f47d2446389a15 According to this commit, the filename in the constructor may also be an empty string since v7.0.10. This will result in a in-memory database. In previous versions of PHP7 (I tested this with v7.0.2) this would have resulted in a exception. The documentation is not mentioning this feature. Test script: --------------- The unit test below works in v7.0.2, but fails in v7.0.17 class SQLiteConstructorTest extends PHPUnit_Framework_TestCase { /** * @expectedException Exception */ public function testDefectDatabaseFile() { $database_file = ''; $sqlitedb = new SQLite3($database_file); } } ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=74397&edit=1

« previous php.doc.bugs (#14601) next »