Function __global->detect_string_bom
Definitions
sources/global3.php
- Detect a BOM (Unicode byte-order-mark) from a string, and find the associated character set.
- Visibility: public
- Is abstract?: No
- Is static?: No
- Is final?: No
- Returns: array
Parameters
| Name | Type | Passed by reference? | Variadic? | Default | Set | Range | Description |
|---|---|---|---|---|---|---|---|
| $contents | string | No | No | required parameter | N/A | N/A | Input string |
Returns
- A pair: The character set (null is unknown), The BOM (null is unknown)
- Type: array
- Set: N/A
- Range: N/A
Preview
Code (PHP)
/**
* Detect a BOM (Unicode byte-order-mark) from a string, and find the associated character set.
*
* @param string $contents Input string
* @return array A pair: The character set (null is unknown), The BOM (null is unknown)
*/
function detect_string_bom(string $contents) : array
* Detect a BOM (Unicode byte-order-mark) from a string, and find the associated character set.
*
* @param string $contents Input string
* @return array A pair: The character set (null is unknown), The BOM (null is unknown)
*/
function detect_string_bom(string $contents) : array

