Skip to content

Regression: MultipleIterator::setFlags(null) E_DEPRECATED cites parameter #0 — Zend #1 ($flags) (ext/spl/spl_iterators.c) #31795

Description

@PurHur

Category

Regression: · php-src-strict · SPL soft-null

Problem

MultipleIterator::setFlags(null) under non-strict types emits E_DEPRECATED and soft-coerces to 0, but the deprecation cites parameter #0 ($flags). Zend cites parameter #1. Sibling soft-null setters: RegexIterator (#31748), CachingIterator (#31694).

Probed 2026-08-17 — host Zend PHP 8.2+ vs php bin/vm.php.

Repro Zend 8.2+ VM (2026-08-17)
$m->setFlags(null) then getFlags() E_DEPRECATED parameter #1 ($flags) + 0 E_DEPRECATED parameter #0 ($flags) + 0

php-src reference

PHP implementation target

Repro

./script/docker-exec.sh -- bash -lc 'php test/repro/maintainer_gap_multipleiterator_setflags_null.php'
./script/docker-exec.sh -- bash -lc 'php bin/vm.php test/repro/maintainer_gap_multipleiterator_setflags_null.php'

Done when

  • setFlags(null) emits Zend-matching E_DEPRECATED citing parameter Php stdlib specs implementation #1 ($flags) then stores 0 on VM; JIT agrees
  • Compliance .phpt guard under test/compliance/cases/ (SPL / MultipleIterator)
  • 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