Services_JSON::strlen8

Advertisement

Deprecated Deprecated

This method has been deprecated. Use the PHP native JSON extension instead.

Summery Summery

Calculates length of string in bytes

Syntax Syntax

Services_JSON::strlen8( $str )

Parameters Parameters

(string) (Required)

Return Return

(integer) length

Source Source

File: wp-includes/class-json.php

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

Advertisement

Changelog Changelog

Changelog
Version Description
5.3.0 Introduced.

Advertisement

Leave a Reply

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