3v4l.org

run code in 300+ PHP versions simultaneously
<?php function my_udf_md5($string) { throw new \Exception("test exception\n"); } $db = new SQLite3(':memory:'); $db->createFunction('my_udf_md5', 'my_udf_md5'); try { $result = $db->querySingle('SELECT my_udf_md5("test")'); var_dump($result); } catch(\Exception $e) { echo "Exception: ".$e->getMessage(); }

preferences:
28.94 ms | 402 KiB | 5 Q