A WordPress-centric search engine for devs and theme authors



randomcompat_strlen ›

Sincen/a
Deprecatedn/a
randomcompat_strlen ( $binary_string )
Parameters:
  • (string) $binary_string
    Required: Yes
Returns:
  • (int)
Defined at:
Codex:

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

This version just used the default strlen()



Source

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