Services_JSON::substr8

Advertisement

Deprecated Deprecated

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

Summery Summery

Returns part of a string, interpreting $start and $length as number of bytes.

Syntax Syntax

Services_JSON::substr8( $string,  $start,  $length = false )

Parameters Parameters

(Required) length

Return Return

(integer) length

Source Source

File: wp-includes/class-json.php

    function substr8( $string, $start, $length=false ) 
    {
        _deprecated_function( __METHOD__, '5.3.0', 'The PHP native JSON extension' );

        if ( $length === false ) {
            $length = $this->strlen8( $string ) - $start;
        }
        if ( $this->_mb_substr ) {
            return mb_substr( $string, $start, $length, "8bit" );
        }
        return substr( $string, $start, $length );
    }

Advertisement

Changelog Changelog

Changelog
Version Description
5.3.0 Introduced.

Advertisement

Leave a Reply