You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Under non-strict types, stream_context_set_option($ctx, null, $option, $value) must emit Zend’s E_DEPRECATED for null $wrapper_or_options (array|string) and still return true. VM returns true silently (no Deprecated).
Repro
Zend 8.2.32 (2026-08-16)
VM (2026-08-16)
stream_context_set_option($c, null, 'a', 'b')
Deprecated: … Passing null to parameter #2 ($wrapper_or_options) of type array|string is deprecated + true
true (no Deprecated)
Distinct from closed incomplete-args / Reflection work (#30645, #28344) and PROFILE=8.4 null TypeError (#19213).
ext/standard/stream_context_set_option.php / VmStreamContext.php / JitStreamContextSetOption.php — soft-null DEP on arg Php stdlib specs implementation #2 via shared string/array null-deprecate helper before coerce; keep success true; no new runtime/*.c
Category
stdlib· php-src-strictProblem
Under non-strict types,
stream_context_set_option($ctx, null, $option, $value)must emit Zend’sE_DEPRECATEDfor null$wrapper_or_options(array|string) and still returntrue. VM returnstruesilently (no Deprecated).stream_context_set_option($c, null, 'a', 'b')Deprecated: … Passing null to parameter #2 ($wrapper_or_options) of type array|string is deprecated+truetrue(no Deprecated)Distinct from closed incomplete-args / Reflection work (#30645, #28344) and PROFILE=8.4 null TypeError (#19213).
php-src reference
ext/standard/streamsfuncs.c—PHP_FUNCTION(stream_context_set_option)ext/standard/basic_functions.stub.php—wrapper_or_options: array|stringPHP implementation target
ext/standard/stream_context_set_option.php/VmStreamContext.php/JitStreamContextSetOption.php— soft-null DEP on arg Php stdlib specs implementation #2 via shared string/array null-deprecate helper before coerce; keep successtrue; no newruntime/*.cRepro
Done when
$wrapper_or_options→ Zend-shapedE_DEPRECATEDthentrue(VM + JIT/AOT when in scope)strict_types, null still TypeErrors if that is Zend’s path for this profile