Skip to content

Stdlib: mb_ucfirst()/mb_lcfirst() on forward 8.4 profile (#17609)#17614

Merged
PurHur merged 1 commit into
masterfrom
agent/issue-17609-mb-ucfirst-lcfirst
Jul 10, 2026
Merged

Stdlib: mb_ucfirst()/mb_lcfirst() on forward 8.4 profile (#17609)#17614
PurHur merged 1 commit into
masterfrom
agent/issue-17609-mb-ucfirst-lcfirst

Conversation

@PurHur

@PurHur PurHur commented Jul 10, 2026

Copy link
Copy Markdown
Owner

Summary

  • Register mb_ucfirst() / mb_lcfirst() (PHP 8.3+, php-src ext/mbstring/mbstring.c) on forward PHP_COMPILER_PROFILE=8.4 with function_exists() parity via CompilerVersion::supportsMbUcfirstLcfirst() / advertisesMbUcfirstLcfirst().
  • Implement VmMbstring::ulcfirst() (first multibyte char title/lower case) and wire builtins in ext/mbstring/Module.php + BuiltinIntrospectionPolicy.
  • Add compliance/repro guards and capability-matrix gated rows; extend self-host spine includes.

Closes #17609

php-src reference

  • ext/mbstring/mbstring.cPHP_FUNCTION(mb_ucfirst), PHP_FUNCTION(mb_lcfirst), php_mb_ulcfirst()

PHP implementation

  • ext/mbstring/mb_ucfirst.php, ext/mbstring/mb_lcfirst.php
  • ext/mbstring/VmMbstring.phpucfirst() / lcfirst() / ulcfirst()
  • lib/CompilerVersion.php — forward-profile gates

Verification

./script/docker-exec.sh -- bash -lc 'PHP_COMPILER_PROFILE=8.4 php bin/vm.php test/repro/maintainer_gap_mb_ucfirst_forward84_missing.php'
# ok

./script/docker-exec.sh -- bash -lc 'source script/php-env.sh && vendor/bin/phpunit --filter mb_ucfirst'
# OK

php script/bootstrap-inventory.php --check
# OK 4315/4315

php script/capability-matrix.php --check
# docs/capabilities.md is up to date (925 builtins)

php script/check-selfhost-spine-coverage-sync.php
# OK

Made with Cursor

Register PHP 8.3+ multibyte first-character case builtins gated like mb_str_pad,
with VmMbstring ulcfirst lowering matching php-src and function_exists parity.

Closes #17609

Co-authored-by: Cursor <cursoragent@cursor.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Stdlib: mb_ucfirst()/mb_lcfirst() missing on forward 8.4 profile while mb_trim family registered (ext/mbstring/mbstring.c, extends #4007)

1 participant