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
{{ message }}
Repository navigation
Stdlib: mb_substr()/mb_strimwidth()/mb_strcut()/mb_strpos() float int params under strict_types — TypeError missing (ext/mbstring/mbstring.c) #13849
stdlib · php-src-strict · mbstring int parameters under caller strict_types
Problem
With declare(strict_types=1) at the call site, Zend rejects float offsets/lengths to mb_substr(), mb_strimwidth(), mb_strcut(), and mb_strpos() with TypeError. This compiler truncates floats and returns string results.
php-src reference
ext/mbstring/mbstring.c — php_mb_substr, php_mb_strimwidth, php_mb_strcut, php_mb_strpos; int params checked against caller strict_types
Activity
PurHur commentedon Jun 30, 2026
claim: PHP Compiler STD Lib — batch (issue #13849)
Fix mbstring float int params TypeError under strict_types (#13849). (#…
PurHur commentedon Jun 30, 2026
Merged via #13879. VM repro + compliance green; coercive truncation preserved outside strict_types.