Skip to content

Regression: get_html_translation_table/hash_update*/ob_get_status named args rejected — Reflection OK or stream name drift (ext stubs) #23786

Description

@PurHur

Category

bug · php-src-strict · named arguments / Reflection

Problem

Several builtins either (a) already match Zend Reflection but still reject named args (BuiltinParamNames gap), or (b) drift on stream-related param names. Probed 2026-07-27 vs host Zend 8.2.32.

Function Zend Reflection VM Reflection Named symptom
get_html_translation_table table,flags,encoding same Unknown named parameter $table
hash_update context,data same Unknown named parameter $context
hash_update_file context,filename,stream_context context,filename (missing 3rd) Zend stream_context: rejected
hash_update_stream context,stream,length context,handle,length Zend stream: rejected
ob_get_status full_status same Unknown named parameter $full_status

php-src reference

PHP implementation target

  • lib/BuiltinParamNames.php — add Zend stub maps for all five (include optional stream_context= / length= where stubs have them)
  • Align hash_update_stream Reflection handlestream; accept 3rd arg on hash_update_file
  • Implementations stay in ext/standard / ext/hash PHP; no new C

Repro

./script/docker-exec.sh -- bash -lc 'php bin/vm.php test/repro/maintainer_gap_html_hash_ob_reflection_names.php'
<?php
try { var_export(get_html_translation_table(table: HTML_SPECIALCHARS)['"'] ?? null); echo "\n"; }
catch (Throwable $e) { echo get_class($e), ': ', $e->getMessage(), "\n"; }
try { hash_update(context: hash_init('sha1'), data: 'a'); echo "hash_ok\n"; }
catch (Throwable $e) { echo get_class($e), ': ', $e->getMessage(), "\n"; }
try { var_export(ob_get_status(full_status: false)); echo "\n"; }
catch (Throwable $e) { echo get_class($e), ': ', $e->getMessage(), "\n"; }

Done when

  • All listed named forms succeed on VM (JIT/AOT when in scope)
  • Reflection names match Zend (including hash_update_stream/hash_update_file arity)
  • Compliance .phpt guard(s)
  • php-src-strict; no php-compiler-strict shortcut

Activity

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 workingimplementation-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