IXR_Value::isStruct( array $array ): bool

In this article

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

Parameters

$arrayarrayrequired

Return

bool

Source

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

User Contributed Notes

You must log in before being able to contribute a note or feedback.