wp-includes/compat.php:211Internal compat function to mimic mb_ord().
$stringstring$encoding"UTF-8"|nulloptionalnullint|falsefunction _mb_ord( $string, $encoding = null ) { if ( ! is_string( $string ) || '' === $string || ( isset( $encoding ) && 'UTF-8' !== $encoding ) ) { return false; } $byte_length = 0; $invalid_length = 0; $found_count = _wp_scan_utf8( $string, $byte_length, $invalid_length, null, 1 ); if ( 1 !== $found_count ) { return false; } // These are valid code points, so no further validation is required. $b0 = ord( $string[0] ); switch ( $byte_length ) { case 1: return $b0; case 2: return ( ( ( $b0 & 0x1F ) << 6 ) | ( ( ord( $string[1] ) & 0x3F ) ) ); case 3: return ( ( ( $b0 & 0x0F ) << 12 ) | ( ( ord( $string[1] ) & 0x3F ) << 6 ) | ( ( ord( $string[2] ) & 0x3F ) ) ); case 4: return ( ( ( $b0 & 0x07 ) << 18 ) | ( ( ord( $string[1] ) & 0x3F ) << 12 ) | ( ( ord( $string[2] ) & 0x3F ) << 6 ) | ( ( ord( $string[3] ) & 0x3F ) ) ); } return false;}Introduced in 7.1.0.
Signature, return type and hooks compared across 1 parsed release.
src/wp-includes/compat.php, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.