Skip to content

Stdlib: PDOStatement bindParam/errorInfo/setFetchMode/getColumnMeta missing (ext/pdo/pdo_stmt.c) #19853

Closed

Description

@PurHur

Category

stdlib · php-src-strict · PDO statement API (follow-up to #19838)

Problem

#19838 shipped fetchColumn / rowCount / closeCursor / columnCount / fetchObject(stdClass). Remaining Zend PDOStatement methods still fatal with undefined method on the sqlite VM path:

Method VM after #19838
bindParam / bindColumn missing
errorCode / errorInfo missing
setFetchMode missing
getColumnMeta / nextRowset missing
getAttribute / setAttribute / debugDumpParams missing

php-src reference

PHP implementation target

  • ext/pdo/VmPDOStatement.php — PHP-in-PHP; reuse VmSqlite3Native; no new runtime/ C

Repro

./script/docker-exec.sh -- bash -lc 'source script/php-env.sh
php -r '\''/* via bin/vm.php */'\'' 
cat > /tmp/pdo_stmt_rest.php <<'"'"'PHP'"'"'
<?php
$pdo = new PDO("sqlite::memory:");
$st = $pdo->query("SELECT 1 AS a");
foreach (["bindParam","errorInfo","setFetchMode","getColumnMeta"] as $m) {
  echo $m, "=", method_exists($st, $m) ? "yes" : "no", "\n";
}
PHP
php bin/vm.php /tmp/pdo_stmt_rest.php
'

Done when

  • At least errorInfo(), setFetchMode(), and bindParam() present and php-src-strict for sqlite
  • getColumnMeta(0) returns name/type shape for a simple SELECT
  • Compliance .phpt under test/compliance/cases/pdo/
  • php-src-strict; no php-compiler-strict shortcut

Related

#19838 (merged) · #19821 · #10533 pillar 4

Activity

  1. added
    bugSomething isn't working
    enhancementNew feature or request
    phase-4:stdlibPhase 4 – stdlib for web apps
    area:vmVirtual machine
    implementation-readySpec complete: repro, php-src ref, done-when — safe for workers to claim
    on Jul 17, 2026
  2. PurHur commented on Jul 17, 2026

    @PurHur
    OwnerAuthor

    claim: PHP Compiler STD Lib Advanced — batch (issues #19861, #19853, #19862, #19863)

    Gate snapshot (before claim):

  3. PurHur commented on Jul 17, 2026

    @PurHur
    OwnerAuthor

    claim: PHP Compiler STD Lib Advanced — batch (#19861→#19853→#19862→#19863); continuing after prior claim. Currently implementing #19861 first.

  4. PurHur commented on Jul 17, 2026

    @PurHur
    OwnerAuthor

    claim: PHP Compiler STD Lib Advanced — implementing #19853 now (after #19861 merged).

  5. PurHur commented on Jul 17, 2026

    @PurHur
    OwnerAuthor

    Merged via #19885

    Verification: live bindParam, getColumnMeta, errorInfo/setFetchMode green on VM 8.4; inventory OK after rebase regen (5299/5299).

    Next: #19862.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:vmVirtual machinebugSomething isn't workingenhancementNew feature or requestimplementation-readySpec complete: repro, php-src ref, done-when — safe for workers to claimphase-4:stdlibPhase 4 – stdlib for web appsstdlib

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions