WordPress at Your Fingertips
function is not described

Services_JSON::strlen8() public WP 1.0

Deprecated from version 5.3.0. It is no longer supported and can be removed in future releases. Use PHP native JSON extension instead.

Calculates length of string in bytes

{} It's a method of the class: Services_JSON{}

No Hooks.


Int. length


$Services_JSON = new Services_JSON();
$Services_JSON->strlen8( $str );
$str (required)


Deprecated Since 5.3.0 Use the PHP native JSON extension instead.

Code of Services_JSON::strlen8() WP 5.8.1

function strlen8( $str ) 
    _deprecated_function( __METHOD__, '5.3.0', 'The PHP native JSON extension' );

    if ( $this->_mb_strlen ) {
        return mb_strlen( $str, "8bit" );
    return strlen( $str );