I was unable to find any information about this behavior online, so any help will be much appreciated.
When using the following code:
//create file with encryption key "test1"
$tempDB = new \SQLite3("temp.db", SQLITE3_OPEN_READWRITE | SQLITE3_OPEN_CREATE, "test1");
//attempt to open the same file using key "test2"
$tempDB = new \SQLite3("temp.db", SQLITE3_OPEN_READWRITE, "test2");
var_dump($tempDB->lastErrorCode()); //int(0) : no error?
Is this the expected behavior? If so, how can I check whether or not a key is correct for a given SQLite3 file?