IXR_Value::isStruct() – Checks whether or not the supplied array is a struct or not

You appear to be a bot. Output may be restricted

Description

Checks whether or not the supplied array is a struct or not

Usage

$bool = IXR_Value::isStruct( $array );

Parameters

$array
( array ) required

Returns

bool

Source

File name: wordpress/wp-includes/IXR/class-IXR-value.php
Lines:

1 to 11 of 11
    function isStruct($array)
    {
        $expected = 0;
        foreach ($array as $key => $value) {
            if ((string)$key !== (string)$expected) {
                return true;
            }
            $expected++;
        }
        return false;
    }
 

 View on GitHub View on Trac