xref: /PHP-8.2/ext/pdo_sqlite/tests/bug52487.phpt (revision 74859783)
1--TEST--
2Bug #52487 (PDO::FETCH_INTO leaks memory)
3--EXTENSIONS--
4pdo_sqlite
5--FILE--
6<?php
7require __DIR__ . '/../../../ext/pdo/tests/pdo_test.inc';
8$db = PDOTest::test_factory(__DIR__ . '/common.phpt');
9
10$stmt = $db->prepare("select 1 as attr");
11for ($i = 0; $i < 10; $i++) {
12    $stmt->setFetchMode(PDO::FETCH_INTO, new stdClass);
13}
14
15print "ok\n";
16
17?>
18--EXPECT--
19ok
20