wpseek.com
Bazujące na WordPress narzędzie wyszukiwania dla deweloperów i twórców motywów.
_wp_is_valid_utf8_fallback is private and should not be used in themes or plugins directly.
_wp_is_valid_utf8_fallback › WordPress Function
Od6.9.0
Przestarzałyn/a
› _wp_is_valid_utf8_fallback ( $bytes )
| Dostęp: |
|
| Parametry: |
|
| Zobacz: |
|
| Powrót: |
|
| Zdefiniowane na: |
|
| Codex: |
Fallback mechanism for safely validating UTF-8 bytes.
Źródło
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;
}