Category
stdlib · php-src-strict · ext/sqlite3 · pillar 4
Problem
#19862 / #19821 restored query/prepare/createFunction/busyTimeout/enableExceptions, but several stub methods remain unregistered. Apps that reopen DBs via open(), use aggregates/collations, backup, load extensions, or read lastError* still fatal.
Verified 2026-07-18 (PHP_COMPILER_PROFILE=8.4, VM) — get_class_methods(SQLite3):
Present: __construct, close, query, exec, prepare, createFunction, enableExceptions, busyTimeout, lastInsertRowID, changes, escapeString, querySingle
Missing vs php-src stub:
| Method |
php-src |
VM |
open |
present |
missing |
createAggregate |
present |
missing |
createCollation |
present |
missing |
backup |
present |
missing |
loadExtension |
present |
missing |
version (static) |
present |
missing |
totalChanges |
present |
missing |
lastErrorCode / lastErrorMsg |
present |
missing |
$db = new SQLite3(':memory:');
$db->open(':memory:'); // Error: Call to undefined method SQLite3::open()
php-src reference
PHP implementation target
ext/sqlite3/ PHP-in-PHP handlers mirroring existing createFunction / query patterns
open can share construct/open path; lastError* read from connection state already tracked for exec failures
- No new
runtime/*.c
Repro
./script/docker-exec.sh -- bash -lc 'source script/php-env.sh && PHP_COMPILER_PROFILE=8.4 php bin/vm.php -r "
foreach ([\"open\",\"backup\",\"createAggregate\",\"createCollation\",\"loadExtension\",\"version\",\"totalChanges\",\"lastErrorCode\",\"lastErrorMsg\",\"createFunction\"] as \$m) {
echo \$m, \": \", method_exists(SQLite3::class, \$m) ? \"yes\" : \"NO\", PHP_EOL;
}
"'
Done when
Related
Category
stdlib· php-src-strict · ext/sqlite3 · pillar 4Problem
#19862 / #19821 restored
query/prepare/createFunction/busyTimeout/enableExceptions, but several stub methods remain unregistered. Apps that reopen DBs viaopen(), use aggregates/collations, backup, load extensions, or readlastError*still fatal.Verified 2026-07-18 (
PHP_COMPILER_PROFILE=8.4, VM) —get_class_methods(SQLite3):Present:
__construct,close,query,exec,prepare,createFunction,enableExceptions,busyTimeout,lastInsertRowID,changes,escapeString,querySingleMissing vs php-src stub:
opencreateAggregatecreateCollationbackuploadExtensionversion(static)totalChangeslastErrorCode/lastErrorMsgphp-src reference
ext/sqlite3/sqlite3.stub.php—class SQLite3method listext/sqlite3/sqlite3.c—SQLITE3_METHOD(open|backup|createAggregate|…)PHP implementation target
ext/sqlite3/PHP-in-PHP handlers mirroring existingcreateFunction/querypatternsopencan share construct/open path;lastError*read from connection state already tracked for exec failuresruntime/*.cRepro
Done when
open,lastErrorCode,lastErrorMsg,totalChanges,versionregistered and match Zend semantics on happy pathcreateAggregateorcreateCollationimplemented (other may be follow-up)backupand/orloadExtensionimplemented or split follow-up issueRelated