wpseek.com
Un motore di ricerca WordPress per sviluppatori e autori di temi
_wp_is_valid_utf8_fallback is private and should not be used in themes or plugins directly.
_wp_is_valid_utf8_fallback › WordPress Function
Da6.9.0
Deprecaton/a
› _wp_is_valid_utf8_fallback ( $bytes )
| Accedi: |
|
| Parametri: |
|
| Vedi: |
|
| Ritorna: |
|
| Definito a: |
|
| Codex: |
Fallback mechanism for safely validating UTF-8 bytes.
Sorgenti
function _wp_is_valid_utf8_fallback( string $bytes ): bool {
$bytes_length = strlen( $bytes );
if ( 0 === $bytes_length ) {
return true;
}
$next_byte_at = 0;
$invalid_length = 0;
_wp_scan_utf8( $bytes, $next_byte_at, $invalid_length );
return $bytes_length === $next_byte_at && 0 === $invalid_length;
}