Category
Regression: · php-src-strict · CachingIterator::setFlags null flags
Problem
CachingIterator::setFlags(null) soft-coerces on Zend with E_DEPRECATED for parameter #1 ($flags) and stores flags=0. VM throws TypeError: Argument #1 ($flags) must be of type int, null given.
Distinct from open #31679 (__construct null $flags missing deprecate) and closed #24252 / #31551 (flag bit ValueError / CALL_TOSTRING).
Probed 2026-08-17 — host Zend PHP 8.2+ vs php bin/vm.php.
| Repro |
Zend 8.2+ |
VM (2026-08-17) |
$c->setFlags(null) after FULL_CACHE construct |
E_DEPRECATED … #1 ($flags) + flags=0 |
TypeError … $flags must be int |
php-src reference
PHP implementation target
ext/spl/CachingIteratorBuiltin.php — null $flags → Zend E_DEPRECATED then coerce to 0 (do not TypeError)
- No new
runtime/*.c
Repro
./script/docker-exec.sh -- bash -lc 'php test/repro/maintainer_gap_cachingiterator_setflags_null.php'
./script/docker-exec.sh -- bash -lc 'php bin/vm.php test/repro/maintainer_gap_cachingiterator_setflags_null.php'
Done when
Category
Regression:· php-src-strict · CachingIterator::setFlags null flagsProblem
CachingIterator::setFlags(null)soft-coerces on Zend withE_DEPRECATEDfor parameter#1 ($flags)and storesflags=0. VM throwsTypeError: Argument #1 ($flags) must be of type int, null given.Distinct from open #31679 (
__constructnull$flagsmissing deprecate) and closed #24252 / #31551 (flag bit ValueError / CALL_TOSTRING).Probed 2026-08-17 — host Zend PHP 8.2+ vs
php bin/vm.php.$c->setFlags(null)afterFULL_CACHEconstructE_DEPRECATED…#1 ($flags)+flags=0TypeError…$flagsmust be intphp-src reference
ext/spl/spl_iterators.c—zim_CachingIterator_setFlagsext/spl/spl_iterators.stub.php—setFlags(int $flags): voidPHP implementation target
ext/spl/CachingIteratorBuiltin.php— null$flags→ ZendE_DEPRECATEDthen coerce to0(do not TypeError)runtime/*.cRepro
Done when
$flagsemitsE_DEPRECATEDciting parameter#1 ($flags)(no TypeError)getFlags()is0after the call