<?php
function my_udf_md5($string) {
return md5($string);
}
$db = new SQLite3('mysqlitedb.db');
$db->createFunction('my_udf_md5', 'my_udf_md5');
var_dump($db->querySingle('SELECT my_udf_md5("test")'));
?>
The above example will output
something similar to:
string(32) "098f6bcd4621d373cade4e832627b4f6"