1--TEST--
2SQLite3::createFunction - Basic test
3--SKIPIF--
4<?php require_once(dirname(__FILE__) . '/skipif.inc'); ?>
5--FILE--
6<?php
7
8require_once(dirname(__FILE__) . '/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--EXPECTF--
24bool(true)
25%string|unicode%(4) "TEST"
26bool(true)
27%string|unicode%(4) "test"
28bool(true)
29%string|unicode%(4) "test"
30