1--TEST--
2Pdo\Sqlite basic
3--EXTENSIONS--
4pdo_sqlite
5--FILE--
6<?php
7
8$db = new Pdo\Sqlite('sqlite::memory:');
9
10$db->query('CREATE TABLE pdosqlite_001 (id INT AUTO INCREMENT, name TEXT)');
11
12$db->query('INSERT INTO pdosqlite_001 VALUES (NULL, "PHP")');
13$db->query('INSERT INTO pdosqlite_001 VALUES (NULL, "PHP6")');
14
15$db->createFunction('testing', function($v) { return strtolower($v); }, 1, Pdo\Sqlite::DETERMINISTIC);
16
17foreach ($db->query('SELECT testing(name) FROM pdosqlite_001') as $row) {
18    var_dump($row);
19}
20
21echo "Fin.";
22?>
23--EXPECT--
24array(2) {
25  ["testing(name)"]=>
26  string(3) "php"
27  [0]=>
28  string(3) "php"
29}
30array(2) {
31  ["testing(name)"]=>
32  string(4) "php6"
33  [0]=>
34  string(4) "php6"
35}
36Fin.
37