xref: /PHP-7.4/ext/pdo/tests/pdo_035.phpt (revision 1aa32afa)
1--TEST--
2PDO Common: PDORow + get_parent_class()
3--SKIPIF--
4<?php
5if (!extension_loaded('pdo_sqlite')) die ("skip Need PDO_SQlite support");
6?>
7--FILE--
8<?php
9$db = new PDO('sqlite::memory:');
10$db->exec('CREATE TABLE test (id int)');
11$db->exec('INSERT INTO test VALUES (23)');
12
13$stmt = $db->prepare('SELECT id FROM test');
14$stmt->execute();
15$result = $stmt->fetch(PDO::FETCH_LAZY);
16
17echo get_class($result), "\n";
18var_dump(get_parent_class($result));
19?>
20--EXPECT--
21PDORow
22bool(false)
23