IXR_Value::isStruct( array $array )
Checks whether or not the supplied array is a struct or not
Parameters
- $array
-
(array) (Required)
Return
(bool)
Source
File: wp-includes/IXR/class-IXR-value.php
function isStruct($array)
{
$expected = 0;
foreach ($array as $key => $value) {
if ((string)$key !== (string)$expected) {
return true;
}
$expected++;
}
return false;
}
© 2003–2021 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/classes/ixr_value/isstruct