function &deAspisR(&$haystack) { global $ASPIS_INFO_COLLECT; if ($ASPIS_INFO_COLLECT) { AspisLogExamine($haystack); } $haystack = $haystack[0]; /* * Input objects are used only in get_object_vars(). There, just remove the global aspis */ if (is_array($haystack)) { $currentkey = key($haystack); foreach ($haystack as &$value) { deAspisR($value); } unset($value); if ($currentkey !== NULL) { reset($haystack); while (key($haystack) !== $currentkey) { next($haystack); } } $currentkey = key($haystack); } return $haystack; }
function Aspis_in_array($needle, $haystack, $strict = dummy) { $needle = $needle[0]; deAspisR($haystack); if ($strict == dummy) { return array(in_array($needle, $haystack), false); } else { return array(in_array($needle, $haystack, $strict[0]), false); } }