1--TEST--
2SQLite3::createFunction - Basic test
3--SKIPIF--
4<?php require_once(__DIR__ . '/skipif.inc'); ?>
5--FILE--
6<?php
7
8require_once(__DIR__ . '/new_db.inc');
9
10$func = 'strtoupper';
11var_dump($db->createfunction($func, $func));
12var_dump($db->querySingle('SELECT strtoupper("test")'));
13
14$func2 = 'strtolower';
15var_dump($db->createfunction($func2, $func2));
16var_dump($db->querySingle('SELECT strtolower("TEST")'));
17
18var_dump($db->createfunction($func, $func2));
19var_dump($db->querySingle('SELECT strtoupper("tEst")'));
20
21
22?>
23--EXPECT--
24bool(true)
25string(4) "TEST"
26bool(true)
27string(4) "test"
28bool(true)
29string(4) "test"
30