sapi_windows_cp_get()
sapi_windows_cp_get() — Get current codepage.
Built-in function of PHP 8.5. The manual lists it as available in PHP 7 >= 7.1.0, PHP 8. This page is the reference card: signature, parameters and return value, plus the changelog and the example the manual provides.
Signature
sapi_windows_cp_get(string $kind = ""): int
Parameters
| Parameter | Type | What it takes |
|---|---|---|
| $kind | string | The kind of operating system codepage to get, either 'ansi' or 'oem'. Any other value refers to the current codepage of the process. |
Return value
If kind is 'ansi', the current ANSI code page of the operating system is returned. If kind is 'oem', the current OEM code page of the operating system is returned. Otherwise, the current codepage of the process is returned.
Example
The PHP manual ships no example for sapi_windows_cp_get(); the signature and the parameter table above are the contract.
See also
All PHP 8.5 built-in functions
Reference card built from the PHP manual page sapi_windows_cp_get() (PHP documentation, CC BY 3.0). The page is generated from the manual, so the wording of the parameter and return value text follows php.net.