[php-src] Issue #22053: ext/intl: PHP appears to under-expose `Spoofchecker` functionality on ICU 57.x,

[email protected] (LamentXU123)
Newsgroups php.bugs
Message-ID <[email protected]>
Issue: https://github.com/php/php-src/issues/22053
Author: LamentXU123

### Description

According to build/php.m4, PHP's ICU minimum is currently `57.1`. And as per the ICU `57.1` doc, ICU already provides the restriction-level API before ICU 58:

  - `uspoof_setRestrictionLevel()`:
    https://unicode-org.github.io/icu-docs/apidoc/dev/icu4c/uspoof_8h.html
<img width="3048" height="942" alt="Image" src="https://github.com/user-attachments/assets/2091ae5f-e4c8-4ff3-a5b8-8a37f5e7d07b" />

  - `URestrictionLevel`:
    https://unicode-org.github.io/icu-docs/apidoc/dev/icu4c/uspoof_8h.html
  - `USPOOF_MIXED_NUMBERS`:
    https://unicode-org.github.io/icu-docs/apidoc/dev/icu4c/uspoof_8h.html

the souece of those is
```c
  #if U_ICU_VERSION_MAJOR_NUM >= 58
      public const int ASCII = UNKNOWN;
      public const int HIGHLY_RESTRICTIVE = UNKNOWN;
      public const int MODERATELY_RESTRICTIVE = UNKNOWN;
      public const int MINIMALLY_RESTRICTIVE = UNKNOWN;
      public const int UNRESTRICTIVE = UNKNOWN;
      public const int SINGLE_SCRIPT_RESTRICTIVE = UNKNOWN;
      public const int MIXED_NUMBERS = UNKNOWN;
  #endif

  #if U_ICU_VERSION_MAJOR_NUM >= 58
      public function setRestrictionLevel(int $level): void {}
  #endif
```

However, every above constants or functions could only be used under ICU >= 58 in php. There is a hard version guard against them, which means if someone build php under ICU 57.x (though it is really, really rare) the guy might have trouble dealing with those APIs in php interface.

There seems to be much more APIs that is supported in ICU 57.x which is clearly supported in php, and could only be used under ICU >= 58. 

I don't sure if we should treat this as a new feature request or a bug report. cc @devnexen if you have enough time on this topic. Or I'd be happy to do this in this weekend :)

### PHP Version

```plain
all versions
```

### Operating System

N/A
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.