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
str_shuffle() must accept only string operands. Zend raises TypeError when argument #1 is not a string (e.g. []). This compiler silently accepts non-string values on VM (no exception) and uses LogicException in the builtin guard instead of TypeError.
Affected: VM (ext/standard/str_shuffle.php), JIT (JitStrShuffle via jitString()).
Category
stdlibProblem
str_shuffle()must accept onlystringoperands. Zend raisesTypeErrorwhen argument #1 is not a string (e.g.[]). This compiler silently accepts non-string values on VM (no exception) and usesLogicExceptionin the builtin guard instead ofTypeError.Affected: VM (
ext/standard/str_shuffle.php), JIT (JitStrShuffleviajitString()).php-src reference
ext/standard/string.c—PHP_FUNCTION(str_shuffle)Repro (failure today)
TypeError: str_shuffle(): Argument #1 ($string) must be of type string, array givenbin/vm.phpno throw(accepts[]without exception)Scope (this repo)
ext/standard/str_shuffle.phpext/standard/JitStrShuffle.phptest/compliance/cases/stdlib/str_shuffle_type_error.phptDone when
TypeErrorwith Zend-like message on VM, JIT, and AOT../script/docker-exec.sh -- bash -lc 'source script/php-env.sh && php bin/vm.php test/compliance/cases/stdlib/str_shuffle_type_error.phpt'exits 0.