src/Sqlite/SqliteConnection.php
public static function fromMemory(string $prefix = ''): SqliteConnection
    {
        $pdo = new \PDO('sqlite::memory:');
        $pdo->setAttribute(\PDO::ATTR_ERRMODE, \PDO::ERRMODE_EXCEPTION);
        
        $pdo->exec("PRAGMA foreign_keys = ON");
        
        return new static($pdo, $prefix);
    }
public static function fromMemory(string $prefix = ''): SqliteConnection
    {
        $pdo = new \PDO('sqlite::memory:');
        $pdo->setAttribute(\PDO::ATTR_ERRMODE, \PDO::ERRMODE_EXCEPTION);
        
        $pdo->exec("PRAGMA foreign_keys = ON");
        
        return new static($pdo, $prefix);
    }
Create an in-memory Sqlite database, very fast but not durable!

@param string $prefix DB schema object prefix to be used.