IXR_Value::isStruct()publicWP 1.0

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

Метод класса: IXR_Value{}

Хуков нет.

Возвращает

true|false.

Использование

$IXR_Value = new IXR_Value();
$IXR_Value->isStruct( $array );
$array(массив) (обязательный)
-

Код IXR_Value::isStruct() WP 6.7.2

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