Bom
: string
Table of Contents
Cases
-
Utf16Be
= "\xfe\xff"
-
Utf16Le
= "\xff\xfe"
-
Utf32Be
= "\x00\x00\xfe\xff"
-
Utf32Le
= "\xff\xfe\x00\x00"
-
Utf8
= ""
Methods
-
encoding()
: string
-
fromEncoding()
: self
-
fromSequence()
: self
-
isUtf16()
: bool
-
isUtf32()
: bool
-
isUtf8()
: bool
-
length()
: int
-
tryFromEncoding()
: self|null
-
tryFromSequence()
: self|null
-
getContents()
: string|null
Utf32Le
Utf32Be
Utf16Be
Utf16Le
Utf8
encoding()
public
encoding() : string
fromEncoding()
public
static fromEncoding(string $name) : self
Parameters
-
$name
: string
-
fromSequence()
public
static fromSequence(mixed $sequence) : self
Parameters
-
$sequence
: mixed
-
isUtf16()
public
isUtf16() : bool
isUtf32()
public
isUtf32() : bool
isUtf8()
public
isUtf8() : bool
length()
public
length() : int
tryFromEncoding()
public
static tryFromEncoding(string $name) : self|null
Parameters
-
$name
: string
-
-
see
-
https://unicode.org/faq/utf_bom.html#gen7
tryFromSequence()
public
static tryFromSequence(mixed $sequence) : self|null
Parameters
-
$sequence
: mixed
-
getContents()
private
static getContents(Stream|SplFileObject $sequence, int $length, int $offset) : string|null
Parameters
-
$sequence
: Stream|SplFileObject
-
-
$length
: int
-
-
$offset
: int
-
Return values
string|null