Skip to content

Stdlib: mb_ucwords() still missing on PROFILE=8.4 (re-#20799, ext/mbstring/mbstring.c) #21394

Description

@PurHur

Category

stdlib · php-src-strict · PHP 8.4 mbstring case helpers (pillar 4)

Problem

#20799 closed 2026-07-19, but master still has no mb_ucwords() under PHP_COMPILER_PROFILE=8.4 while sibling helpers (mb_ucfirst, mb_trim, …) register. Probed 2026-07-20 in Docker.

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

php-src reference

PHP implementation target

  • Add ext/mbstring/mb_ucwords.php mirroring mb_ucfirst / mb_convert_case paths
  • Register in ext/mbstring/Module.php with the same forward-profile gate as mb_ucfirst
  • PHP-in-PHP; no new C in runtime/

Repro

./script/docker-exec.sh -- bash -lc 'export PHP_COMPILER_PROFILE=8.4
php bin/vm.php test/repro/maintainer_gap_mb_ucwords_missing_forward84.php'

Expect mb_ucwords=yes and Hello World, not fail: undefined mb_ucwords.

Done when

  • function_exists('mb_ucwords') true under PHP_COMPILER_PROFILE=8.4
  • mb_ucwords('hello world')Hello World (encoding arg parity with Zend)
  • VM/JIT/AOT agree when mbstring lowering is in scope
  • Compliance .phpt under test/compliance/cases/mbstring/; php-src-strict

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 machineenhancementNew feature or requestimplementation-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