Skip to content

Regression: mb_ucwords() missing on PROFILE=8.4 after mb_ucfirst/mb_trim (re-#20799, ext/mbstring/mbstring.c) #21120

Description

@PurHur

Category

stdlib · php-src-strict · Pillar 4 Correctness · (re-#20799 / #20647 / #20274)

Problem

Under PHP_COMPILER_PROFILE=8.4, mb_ucfirst() / mb_lcfirst() / mb_trim() / mb_str_pad() are registered, but mb_ucwords() is not (function_exists false). Prior issues closed as fixed; gap is back on current master.

Probed 2026-07-19 on c8e43c835 via ./script/docker-exec.sh.

Repro Zend 8.4 + mbstring VM PROFILE=8.4 (2026-07-19)
function_exists('mb_ucfirst') true true
function_exists('mb_ucwords') true false
mb_ucwords('hello world') Hello World Error: Call to undefined function mb_ucwords()

php-src reference

PHP implementation target

  • Add ext/mbstring/mb_ucwords.php (mirror ext/mbstring/mb_ucfirst.php)
  • Register in ext/mbstring/Module.php + spine inventory; reuse VmMbstring case-helper path
  • PHP-in-PHP; no new runtime/*.c

Repro

./script/docker-exec.sh -- bash -lc 'export PHP_COMPILER_PROFILE=8.4
php bin/vm.php -r \"
echo function_exists(\\"mb_ucwords\\") ? \\"yes\\" : \\"no\\", PHP_EOL;
echo mb_ucwords(\\"hello world\\"), PHP_EOL;
\"'

Done when

  • function_exists('mb_ucwords') true under PHP_COMPILER_PROFILE=8.4
  • mb_ucwords('hello world')Hello World (encoding/arg coercion php-src-strict with mb_ucfirst)
  • Compliance .phpt under test/compliance/cases/mbstring/
  • 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