Linux vps-61133.fhnet.fr 4.9.0-19-amd64 #1 SMP Debian 4.9.320-2 (2022-06-30) x86_64
Apache/2.4.25 (Debian)
Server IP : 93.113.207.21 & Your IP : 216.73.216.119
Domains :
Cant Read [ /etc/named.conf ]
User : www-data
Terminal
Auto Root
Create File
Create Folder
Localroot Suggester
Backdoor Destroyer
Readme
/
usr /
src /
php-7.4.33 /
ext /
pdo_sqlite /
tests /
Delete
Unzip
Name
Size
Permission
Date
Action
bug33841.phpt
690
B
-rw-rw-r--
2022-10-31 11:36
bug35336.phpt
570
B
-rw-rw-r--
2022-10-31 11:36
bug43831.phpt
1.02
KB
-rw-rw-r--
2022-10-31 11:36
bug44327_2.phpt
1007
B
-rw-rw-r--
2022-10-31 11:36
bug44327_3.phpt
616
B
-rw-rw-r--
2022-10-31 11:36
bug46139.phpt
1004
B
-rw-rw-r--
2022-10-31 11:36
bug46542.phpt
392
B
-rw-rw-r--
2022-10-31 11:36
bug48773.phpt
804
B
-rw-rw-r--
2022-10-31 11:36
bug50728.phpt
307
B
-rw-rw-r--
2022-10-31 11:36
bug52487.phpt
422
B
-rw-rw-r--
2022-10-31 11:36
bug60104.phpt
381
B
-rw-rw-r--
2022-10-31 11:36
bug66033.phpt
746
B
-rw-rw-r--
2022-10-31 11:36
bug70221.phpt
562
B
-rw-rw-r--
2022-10-31 11:36
bug70862.phpt
895
B
-rw-rw-r--
2022-10-31 11:36
bug78192.phpt
1.05
KB
-rw-rw-r--
2022-10-31 11:36
bug79664.phpt
582
B
-rw-rw-r--
2022-10-31 11:36
bug_42589.phpt
677
B
-rw-rw-r--
2022-10-31 11:36
bug_63916-2.phpt
790
B
-rw-rw-r--
2022-10-31 11:36
bug_63916.phpt
768
B
-rw-rw-r--
2022-10-31 11:36
bug_64705.phpt
415
B
-rw-rw-r--
2022-10-31 11:36
common.phpt
221
B
-rw-rw-r--
2022-10-31 11:36
debugdumpparams_001.phpt
619
B
-rw-rw-r--
2022-10-31 11:36
pdo_fetch_func_001.phpt
3.35
KB
-rw-rw-r--
2022-10-31 11:36
pdo_sqlite_createaggregate.phpt
710
B
-rw-rw-r--
2022-10-31 11:36
pdo_sqlite_createaggregate_002.phpt
489
B
-rw-rw-r--
2022-10-31 11:36
pdo_sqlite_createcollation.phpt
907
B
-rw-rw-r--
2022-10-31 11:36
pdo_sqlite_createfunction.phpt
759
B
-rw-rw-r--
2022-10-31 11:36
pdo_sqlite_createfunction_002.phpt
434
B
-rw-rw-r--
2022-10-31 11:36
pdo_sqlite_createfunction_with_flags.phpt
881
B
-rw-rw-r--
2022-10-31 11:36
pdo_sqlite_extendederror_attr.phpt
2.31
KB
-rw-rw-r--
2022-10-31 11:36
pdo_sqlite_get_attribute.phpt
337
B
-rw-rw-r--
2022-10-31 11:36
pdo_sqlite_lastinsertid.phpt
679
B
-rw-rw-r--
2022-10-31 11:36
pdo_sqlite_open_flags.phpt
934
B
-rw-rw-r--
2022-10-31 11:36
pdo_sqlite_statement_getattribute.phpt
447
B
-rw-rw-r--
2022-10-31 11:36
pdo_sqlite_tostring_exception.phpt
868
B
-rw-rw-r--
2022-10-31 11:36
pdo_sqlite_transaction.phpt
585
B
-rw-rw-r--
2022-10-31 11:36
Save
Rename
--TEST-- Testing several callbacks using PDO::FETCH_FUNC --SKIPIF-- <?php if (!extension_loaded('pdo_sqlite')) print 'skip not loaded'; ?> --FILE-- <?php $db = new PDO('sqlite::memory:'); $db->exec('CREATE TABLE testing (id INTEGER , name VARCHAR)'); $db->exec('INSERT INTO testing VALUES(1, "php")'); $db->exec('INSERT INTO testing VALUES(2, "")'); $st = $db->query('SELECT * FROM testing'); $st->fetchAll(PDO::FETCH_FUNC, function($x, $y) use ($st) { var_dump($st); print "data: $x, $y\n"; }); $st = $db->query('SELECT name FROM testing'); var_dump($st->fetchAll(PDO::FETCH_FUNC, 'strtoupper')); $st = $db->query('SELECT * FROM testing'); var_dump($st->fetchAll(PDO::FETCH_FUNC, 'nothing')); $st = $db->query('SELECT * FROM testing'); var_dump($st->fetchAll(PDO::FETCH_FUNC, '')); $st = $db->query('SELECT * FROM testing'); var_dump($st->fetchAll(PDO::FETCH_FUNC, NULL)); $st = $db->query('SELECT * FROM testing'); var_dump($st->fetchAll(PDO::FETCH_FUNC, 1)); $st = $db->query('SELECT * FROM testing'); var_dump($st->fetchAll(PDO::FETCH_FUNC, array('self', 'foo'))); class foo { public function method($x) { return "--- $x ---"; } } class bar extends foo { public function __construct($db) { $st = $db->query('SELECT * FROM testing'); var_dump($st->fetchAll(PDO::FETCH_FUNC, array($this, 'parent::method'))); } static public function test($x, $y) { return $x .'---'. $y; } private function test2($x, $y) { return $x; } public function test3($x, $y) { return $x .'==='. $y; } } new bar($db); $st = $db->query('SELECT * FROM testing'); var_dump($st->fetchAll(PDO::FETCH_FUNC, array('bar', 'test'))); $st = $db->query('SELECT * FROM testing'); var_dump($st->fetchAll(PDO::FETCH_FUNC, array('bar', 'test2'))); $st = $db->query('SELECT * FROM testing'); var_dump($st->fetchAll(PDO::FETCH_FUNC, array('bar', 'test3'))); $st = $db->query('SELECT * FROM testing'); var_dump($st->fetchAll(PDO::FETCH_FUNC, array('bar', 'inexistent'))); ?> --EXPECTF-- object(PDOStatement)#%d (1) { ["queryString"]=> string(21) "SELECT * FROM testing" } data: 1, php object(PDOStatement)#%d (1) { ["queryString"]=> string(21) "SELECT * FROM testing" } data: 2, array(2) { [0]=> string(3) "PHP" [1]=> string(0) "" } Warning: PDOStatement::fetchAll(): SQLSTATE[HY000]: General error: function 'nothing' not found or invalid function name in %s on line %d bool(false) Warning: PDOStatement::fetchAll(): SQLSTATE[HY000]: General error: function '' not found or invalid function name in %s on line %d bool(false) Warning: PDOStatement::fetchAll(): SQLSTATE[HY000]: General error: no array or string given in %s on line %d bool(false) Warning: PDOStatement::fetchAll(): SQLSTATE[HY000]: General error: no array or string given in %s on line %d bool(false) Warning: PDOStatement::fetchAll(): SQLSTATE[HY000]: General error: class 'PDOStatement' does not have a method 'foo' in %s on line %d bool(false) array(2) { [0]=> string(9) "--- 1 ---" [1]=> string(9) "--- 2 ---" } array(2) { [0]=> string(7) "1---php" [1]=> string(4) "2---" } Warning: PDOStatement::fetchAll(): SQLSTATE[HY000]: General error: cannot access private method bar::test2() in %s on line %d bool(false) array(2) { [0]=> string(7) "1===php" [1]=> string(4) "2===" } Warning: PDOStatement::fetchAll(): SQLSTATE[HY000]: General error: class 'bar' does not have a method 'inexistent' in %s on line %d bool(false)