RandomCompat_strlen

Advertisement

Summery Summery

strlen() implementation that isn’t brittle to mbstring.func_overload

Syntax Syntax

RandomCompat_strlen( string $binary_string )

Description Description

This version just used the default strlen()

Parameters Parameters

$binary_string

(string) (Required)

Return Return

(int)

Source Source

File: wp-includes/random_compat/byte_safe_strings.php

        function RandomCompat_strlen($binary_string)
        {
            if (!is_string($binary_string)) {
                throw new TypeError(
                    'RandomCompat_strlen() expects a string'
                );
            }
            return (int) strlen($binary_string);
        }

Advertisement

Advertisement

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.