public static boolean array_walk_recursive(Environment env, TraceInfo trace, @Reference Memory input, Memory callback, Memory userData) throws Throwable { if (!expectingReference(env, trace, input, "array_walk_recursive")) return false; if (!expecting(env, trace, 1, input, ARRAY)) return false; Invoker invoker = expectingCallback(env, trace, 2, callback); if (invoker == null) return false; Set<Integer> used = new HashSet<Integer>(); used.add(input.getPointer()); return _array_walk_recursive(env, trace, input, invoker, userData, used); }
public static boolean is_resource(@Reference Memory memory) { return memory.isResource(); }
public static boolean uasort(Environment env, TraceInfo trace, @Reference Memory array, Memory callback) { return _uasort_impl(env, trace, array, callback); }
public static boolean sort(Environment env, TraceInfo trace, @Reference Memory array, int flags) { return _sort_impl(env, trace, array, flags, false); }
public static Memory print_r(Environment env, @Runtime.Reference Memory value){ return print_r(env, value, false); }
public static boolean asort(Environment env, TraceInfo trace, @Reference Memory array, int flags) { return _asort_impl(env, trace, array, flags, false); }
protected static boolean _sort_impl(Environment env, TraceInfo trace, @Reference Memory array, int flags, boolean revert) { return _sort_impl(env, trace, array, makeComparatorForSort(flags, revert)); }
public static Memory pos(Environment env, TraceInfo trace, @Reference Memory array) { return current(env, trace, array); }
public static boolean array_walk(Environment env, TraceInfo trace, @Reference Memory input, Memory callback) throws Throwable { return array_walk(env, trace, input, callback, Memory.NULL); }
public static Memory end(Environment env, TraceInfo trace, @Reference Memory array) { if (expectingReference(env, trace, array, "end")) { if (expecting(env, trace, 1, array, ARRAY)) { ForeachIterator iterator = array.toValue(ArrayMemory.class).getCurrentIterator(); if (iterator.end()) { return iterator.getValue().toImmutable(); } else { return Memory.FALSE; } } } return Memory.FALSE; }
@Runtime.Immutable(ignoreRefs = true) public static boolean in_array(Environment env, TraceInfo trace, Memory needle, @Reference Memory array) { return in_array(env, trace, needle, array, false); }
public static int extract(Environment env, TraceInfo trace, @Runtime.GetLocals ArrayMemory locals, @Reference Memory array) { return extract(env, trace, locals, array, LangConstants.EXTR_OVERWRITE.toInteger(), Memory.NULL); }
public static Memory next(Environment env, TraceInfo trace, @Reference Memory array) { if (expectingReference(env, trace, array, "next")) { if (expecting(env, trace, 1, array, ARRAY)) { ArrayMemory memory = array.toValue(ArrayMemory.class); ForeachIterator iterator = memory.getCurrentIterator(); if (iterator.next()) return iterator.getValue().toImmutable(); else return Memory.FALSE; } } return Memory.FALSE; }
@Runtime.Immutable(ignoreRefs = true) public static boolean key_exists(Environment env, TraceInfo trace, Memory key, @Reference Memory array) { return array_key_exists(env, trace, key, array); }
public static Memory str_ireplace(Environment env, TraceInfo trace, Memory search, Memory replace, Memory string, @Reference Memory _count) { return _str_replace(env, trace, search, replace, string, _count, true); }
public static boolean is_iterable(@Reference Memory memory) { return memory.isTraversable(); }
public static Memory var_export(Environment env, TraceInfo trace, @Runtime.Reference Memory value){ return var_export(env, trace, value, false); }
public static boolean uksort(Environment env, TraceInfo trace, @Reference Memory array, Memory callback) { return _uksort_impl(env, trace, array, callback); } }
public static Memory prev(Environment env, TraceInfo trace, @Reference Memory array) { if (expectingReference(env, trace, array, "prev")) { if (expecting(env, trace, 1, array, ARRAY)) { ArrayMemory memory = array.toValue(ArrayMemory.class); ForeachIterator iterator = memory.getCurrentIterator(); if (iterator.prev()) return iterator.getValue().toImmutable(); else return Memory.FALSE; } } return Memory.FALSE; }
public static Memory str_replace(Environment env, TraceInfo trace, Memory search, Memory replace, Memory string, @Reference Memory _count) { return _str_replace(env, trace, search, replace, string, _count, false); }