1
0
mirror of https://github.com/php/doc-en.git synced 2026-03-23 23:32:18 +01:00

Improve SQLite createFunction example (#5374)

This commit is contained in:
Michael Voříšek
2026-03-02 22:55:36 +01:00
committed by GitHub
parent 5b7646656e
commit 28930349ca

View File

@@ -134,7 +134,7 @@ function sha256_and_reverse($string)
}
$db = new Pdo\Sqlite('sqlite::sqlitedb');
$db->sqliteCreateFunction('sha256rev', 'sha256_and_reverse', 1);
$db->createFunction('sha256rev', 'sha256_and_reverse', 1);
$rows = $db->query('SELECT sha256rev(filename) FROM files')->fetchAll();
?>
]]>