Although you can create an UDF named 'regexp()', I think it won't be registered as REGEXP operator..
<?php
function my_sqlite_regexp($x,$y){
return (int)preg_match("`$y`i",$x);
}
echo $db->createFunction('regexp','my_sqlite_regexp',2);
$res = $db->query("SELECT * FROM x WHERE regexp(c,'h')", SQLITE_ASSOC , $err) ;
$res = $db->query("SELECT * FROM x WHERE c REGEXP 'h'", SQLITE_ASSOC , $err);
?>
I'd also swapped the function parameters $x and $y, but also not works..
-----
From SQLite documentation:
"The REGEXP operator is a special syntax for the regexp() user function. No regexp() user function is defined by default and so use of the REGEXP operator will normally result in an error message. If a application-defined SQL function named "regexp" is added at run-time, that function will be called in order to implement the REGEXP operator."