Replaces 'ill-formed' byte sequences with '?'.
See: +add a note
(PHP 7 >= 7.2.0, PHP 8)
mb_scrub — Replace ill-formed byte sequences with the substitute character
Perform a character set conversion from the specified encoding, or the default encoding if no encoding was specified, to the same encoding. This has the effect of replacing any invalid byte sequences with the substitute character.
string
The input string.
encoding
The encoding used to interpret string
.
If it is omitted or null
, the
mbstring.internal_encoding setting
will be used if set, otherwise the default_charset setting
will be used.
The string result with invalid byte sequences replaced.
Version | Description |
---|---|
8.0.0 |
encoding is nullable now.
|
↑ and ↓ to navigate •
Enter to select •
Esc to close
Press Enter without
selection to search using Google
Follow Lee on X/Twitter - Father, Husband, Serial builder creating AI, crypto, games & web tools. We are friends :) AI Will Come To Life!
Check out: eBank.nz (Art Generator) |
Netwrck.com (AI Tools) |
Text-Generator.io (AI API) |
BitBank.nz (Crypto AI) |
ReadingTime (Kids Reading) |
RewordGame |
BigMultiplayerChess |
WebFiddle |
How.nz |
Helix AI Assistant