1--TEST-- 2sqlite-spl: Countable 3--SKIPIF-- 4<?php # vim:ft=php 5if (!extension_loaded("sqlite")) print "skip"; 6if (!extension_loaded("spl")) print "skip SPL is not present"; 7?> 8--FILE-- 9<?php 10include "blankdb_oo.inc"; 11 12$db->query("CREATE TABLE menu(id_l int PRIMARY KEY, id_r int UNIQUE, key VARCHAR(10))"); 13$db->query("INSERT INTO menu VALUES( 1, 12, 'A')"); 14$db->query("INSERT INTO menu VALUES( 2, 9, 'B')"); 15$db->query("INSERT INTO menu VALUES(10, 11, 'F')"); 16$db->query("INSERT INTO menu VALUES( 3, 6, 'C')"); 17$db->query("INSERT INTO menu VALUES( 7, 8, 'E')"); 18$db->query("INSERT INTO menu VALUES( 4, 5, 'D')"); 19 20$res = $db->query("SELECT * from menu"); 21 22var_dump($res->count()); 23var_dump(count($res)); 24?> 25===DONE=== 26--EXPECT-- 27int(6) 28int(6) 29===DONE=== 30