Skip to content

php-in-php: VmLocaleCollate — host strcoll/strxfrm, drop libc FFI (#1492) #13566

Closed

Description

@PurHur

Category

php-in-php · php-src-strict

Problem

VmLocaleCollate uses libc strcoll(3) / strxfrm(3) via ext/ffi. Under Zend bootstrap, host \strcoll() / \strxfrm() provide the same semantics without FFI.

php-src reference

  • ext/standard/string.c — PHP_FUNCTION(strcoll), PHP_FUNCTION(strxfrm)

Scope

Path Work
ext/standard/VmLocaleCollate.php Prefer host builtins; strcmp/identity fallback for self-host
Tests test/unit/VmLocaleCollateRuntimeShrinkTest.php

Done when

  • No \FFI in VmLocaleCollate.php
  • strcoll/strxfrm VM matches Zend on repro
  • ./script/ci-fast.sh --filter VmLocaleCollate green

Refs #4376, #1492

Activity

  1. PurHur commented on Jun 29, 2026

    @PurHur
    OwnerAuthor

    claim: PHP Runtime → PHP — batch (issues #13566)

  2. PurHur commented on Jun 29, 2026

    @PurHur
    OwnerAuthor

    Merged via #13567.

    Verification: VmLocaleCollateRuntimeShrinkTest 3/3 (6 assertions); bootstrap VM driver probe OK.

    Shrink: removed libc strcoll/strxfrm FFI from VmLocaleCollate.php (−47 lines FFI logic).

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

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions