RandomCompat_strlen( string $binary_string )

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


Description Description

This version just used the default strlen()


Parameters Parameters

$binary_string

(string) (Required)


Top ↑

Return Return

(int)


Top ↑

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);
        }


Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.