From e735de6eae4a60fb55fac6fc99b6b63f525c4b4b Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Fri, 2 Oct 2020 10:53:21 +0200 Subject: Add GC support for PDO driver data Add a get_gc method that can be implemented by drivers, which can be used to add additional zvals to the GC buffer. Implement GC support for PDO SQLite callbacks in particular. Closes GH-6262. --- ext/pdo_sqlite/tests/gc.phpt | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 ext/pdo_sqlite/tests/gc.phpt (limited to 'ext/pdo_sqlite/tests') diff --git a/ext/pdo_sqlite/tests/gc.phpt b/ext/pdo_sqlite/tests/gc.phpt new file mode 100644 index 0000000000..25407697e6 --- /dev/null +++ b/ext/pdo_sqlite/tests/gc.phpt @@ -0,0 +1,24 @@ +--TEST-- +GC support for PDO Sqlite driver data +--SKIPIF-- + +--FILE-- +a = new PDO('sqlite::memory:'); +$obj->a->sqliteCreateFunction('func1', function() use ($obj) {}, 1); +$obj->a->sqliteCreateAggregate('func2', function() use ($obj) {}, function() use($obj) {}); +$obj->a->sqliteCreateCollation('col', function() use ($obj) {}); + +?> +===DONE=== +--EXPECT-- +===DONE=== -- cgit v1.2.1