PHP_METHOD(Test_BuiltIn_ArrayMethods, getReversed1) { zval _1, _2; zval _0; int ZEPHIR_LAST_CALL_STATUS; ZEPHIR_INIT_THIS(); ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); ZVAL_UNDEF(&_2); ZEPHIR_MM_GROW(); ZEPHIR_INIT_VAR(&_0); zephir_create_array(&_0, 3, 0 TSRMLS_CC); ZEPHIR_INIT_VAR(&_1); ZVAL_LONG(&_1, 1); zephir_array_fast_append(&_0, &_1); ZEPHIR_INIT_NVAR(&_1); ZVAL_LONG(&_1, 2); zephir_array_fast_append(&_0, &_1); ZEPHIR_INIT_NVAR(&_1); ZVAL_LONG(&_1, 3); zephir_array_fast_append(&_0, &_1); ZEPHIR_CALL_FUNCTION(&_2, "array_reverse", NULL, 2, &_0); zephir_check_call_status(); RETURN_CCTOR(_2); }
PHP_METHOD(Test_Exceptions, testExceptionSprintf) { int ZEPHIR_LAST_CALL_STATUS; zval *name_param = NULL, _0, _1; zval name; ZEPHIR_INIT_THIS(); ZVAL_UNDEF(&name); ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); ZEPHIR_MM_GROW(); zephir_fetch_params(1, 1, 0, &name_param); zephir_get_strval(&name, name_param); ZEPHIR_INIT_VAR(&_0); ZVAL_STRING(&_0, "Hello, %s"); ZEPHIR_CALL_FUNCTION(&_1, "sprintf", NULL, 4, &_0, &name); zephir_check_call_status(); zephir_throw_exception_debug(&_1, "test/exceptions.zep", 65 TSRMLS_CC); ZEPHIR_MM_RESTORE(); return; }
PHP_METHOD(Test_Exceptions, testExceptionRethrow) { zval e; int ZEPHIR_LAST_CALL_STATUS; ZEPHIR_INIT_THIS(); ZVAL_UNDEF(&e); ZEPHIR_MM_GROW(); /* try_start_1: */ ZEPHIR_CALL_METHOD(NULL, this_ptr, "testexception1", NULL, 0); zephir_check_call_status_or_jump(try_end_1); try_end_1: if (EG(exception)) { ZVAL_OBJ(&e, EG(exception)); Z_ADDREF_P(&e); if (zephir_instance_of_ev(&e, zend_exception_get_default(TSRMLS_C) TSRMLS_CC)) { zend_clear_exception(TSRMLS_C); zephir_throw_exception_debug(&e, "test/exceptions.zep", 80 TSRMLS_CC); ZEPHIR_MM_RESTORE(); return; } } ZEPHIR_MM_RESTORE(); }
PHP_METHOD(Test_Concat, testConcat2) { zval _1; zval url, _0; ZEPHIR_INIT_THIS(); ZVAL_UNDEF(&url); ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); ZEPHIR_MM_GROW(); ZEPHIR_INIT_VAR(&url); ZVAL_STRING(&url, "test"); ZEPHIR_INIT_VAR(&_0); ZEPHIR_CONCAT_SVS(&_0, "append", &url, "other"); ZEPHIR_CPY_WRT(&url, &_0); ZEPHIR_INIT_VAR(&_1); ZEPHIR_CONCAT_SS(&_1, "append", "other"); ZEPHIR_CPY_WRT(&url, &_1); ZEPHIR_INIT_LNVAR(_0); ZEPHIR_CONCAT_SSV(&_0, "append", "other", &url); ZEPHIR_CPY_WRT(&url, &_0); RETURN_CCTOR(url); }
PHP_METHOD(Test_Oo_OoParams, setStrictName) { zval *name_param = NULL; zval name; ZEPHIR_INIT_THIS(); ZVAL_UNDEF(&name); ZEPHIR_MM_GROW(); zephir_fetch_params(1, 1, 0, &name_param); if (unlikely(Z_TYPE_P(name_param) != IS_STRING && Z_TYPE_P(name_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'name' must be a string") TSRMLS_CC); RETURN_MM_NULL(); } if (likely(Z_TYPE_P(name_param) == IS_STRING)) { zephir_get_strval(&name, name_param); } else { ZEPHIR_INIT_VAR(&name); ZVAL_EMPTY_STRING(&name); } RETURN_CTOR(name); }
PHP_METHOD(Test_Pregmatch, testWithoutReturnAndMatches) { zval pattern, subject, _0, _1, _2; ZEPHIR_INIT_THIS(); ZVAL_UNDEF(&pattern); ZVAL_UNDEF(&subject); ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); ZVAL_UNDEF(&_2); ZEPHIR_MM_GROW(); ZEPHIR_INIT_VAR(&pattern); ZVAL_STRING(&pattern, "/def$/"); ZEPHIR_INIT_VAR(&subject); ZVAL_STRING(&subject, "abcdef"); ZEPHIR_INIT_VAR(&_0); ZEPHIR_INIT_VAR(&_1); zephir_preg_match(&_1, &pattern, &subject, &_0, 0, 0 , 0 TSRMLS_CC); ZEPHIR_INIT_VAR(&_2); zephir_preg_match(return_value, &pattern, &subject, &_2, 0, 0 , 0 TSRMLS_CC); RETURN_MM(); }
/** * Test\Router\Route constructor * * @param string pattern * @param array paths * @param array|string httpMethods */ PHP_METHOD(Test_Router_Route, __construct) { int ZEPHIR_LAST_CALL_STATUS; zval *pattern, pattern_sub, *paths = NULL, paths_sub, *httpMethods = NULL, httpMethods_sub, __$null; ZEPHIR_INIT_THIS(); ZVAL_UNDEF(&pattern_sub); ZVAL_UNDEF(&paths_sub); ZVAL_UNDEF(&httpMethods_sub); ZVAL_NULL(&__$null); ZEPHIR_MM_GROW(); zephir_fetch_params(1, 1, 2, &pattern, &paths, &httpMethods); if (!paths) { paths = &paths_sub; paths = &__$null; } if (!httpMethods) { httpMethods = &httpMethods_sub; httpMethods = &__$null; } ZEPHIR_CALL_METHOD(NULL, this_ptr, "reconfigure", NULL, 0, pattern, paths); zephir_check_call_status(); zephir_update_property_zval(this_ptr, SL("_methods"), httpMethods); ZEPHIR_MM_RESTORE(); }
PHP_METHOD(Test_EmptyTest, testDynamicVarArrayNotEmpty) { zval a, _0; ZEPHIR_INIT_THIS(); ZVAL_UNDEF(&a); ZVAL_UNDEF(&_0); ZEPHIR_MM_GROW(); ZEPHIR_INIT_VAR(&a); zephir_create_array(&a, 4, 0 TSRMLS_CC); ZEPHIR_INIT_VAR(&_0); ZVAL_LONG(&_0, 1); zephir_array_fast_append(&a, &_0); ZEPHIR_INIT_NVAR(&_0); ZVAL_LONG(&_0, 2); zephir_array_fast_append(&a, &_0); ZEPHIR_INIT_NVAR(&_0); ZVAL_LONG(&_0, 3); zephir_array_fast_append(&a, &_0); ZEPHIR_INIT_NVAR(&_0); ZVAL_LONG(&_0, 4); zephir_array_fast_append(&a, &_0); RETURN_MM_BOOL(ZEPHIR_IS_EMPTY(&a)); }
PHP_METHOD(Test_ExitDie, testDie) { zend_bool _0; zval *param = NULL, param_sub; ZEPHIR_INIT_THIS(); ZVAL_UNDEF(¶m_sub); ZEPHIR_MM_GROW(); zephir_fetch_params(1, 0, 1, ¶m); if (!param) { param = ¶m_sub; ZEPHIR_INIT_VAR(param); ZVAL_STRING(param, ""); } _0 = Z_TYPE_P(param) == IS_STRING; if (_0) { _0 = ZEPHIR_IS_STRING(param, ""); } if (_0) { ZEPHIR_MM_RESTORE(); zephir_exit_empty(); } else { ZEPHIR_MM_RESTORE(); zephir_exit(param); } ZEPHIR_MM_RESTORE(); }
PHP_METHOD(Test_Oo_OoDynamicA, getNew) { zend_class_entry *_1; zval className, fullClassName, _0; int ZEPHIR_LAST_CALL_STATUS; ZEPHIR_INIT_THIS(); ZVAL_UNDEF(&className); ZVAL_UNDEF(&fullClassName); ZVAL_UNDEF(&_0); ZEPHIR_MM_GROW(); ZEPHIR_INIT_VAR(&className); zephir_get_called_class(&className TSRMLS_CC); ZEPHIR_INIT_VAR(&fullClassName); ZEPHIR_CONCAT_SV(&fullClassName, "\\", &className); zephir_fetch_safe_class(_0, fullClassName); _1 = zephir_fetch_class_str_ex(Z_STRVAL_P(&_0), Z_STRLEN_P(&_0), ZEND_FETCH_CLASS_AUTO); object_init_ex(return_value, _1); if (zephir_has_constructor(return_value TSRMLS_CC)) { ZEPHIR_CALL_METHOD(NULL, return_value, "__construct", NULL, 0); zephir_check_call_status(); } RETURN_MM(); }
PHP_METHOD(Test_Oo_OoConstruct, __construct) { ZEPHIR_INIT_THIS(); }
PHP_METHOD(Test_Factorial, intRecursiveFactorial) { zend_bool _1; zval *num_param = NULL, _0, _2, _3; int num, ZEPHIR_LAST_CALL_STATUS; ZEPHIR_INIT_THIS(); ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_2); ZVAL_UNDEF(&_3); ZEPHIR_MM_GROW(); zephir_fetch_params(1, 1, 0, &num_param); num = zephir_get_intval(num_param); ZEPHIR_INIT_VAR(&_0); _1 = num == 0; if (!(_1)) { _1 = num == 1; } if (_1) { ZVAL_LONG(&_0, 1); } else { ZVAL_LONG(&_3, (num - 1)); ZEPHIR_CALL_METHOD(&_2, this_ptr, "intrecursivefactorial", NULL, 25, &_3); zephir_check_call_status(); ZVAL_LONG(&_0, (num * zephir_get_numberval(&_2))); } RETURN_CCTOR(_0); }
PHP_METHOD(Test_Factorial, intIterativeFactorial) { zend_bool _0; long result, i = 0; zval *n_param = NULL; int n, _1, _2; ZEPHIR_INIT_THIS(); zephir_fetch_params(0, 1, 0, &n_param); n = zephir_get_intval(n_param); result = 1; _2 = n; _1 = 2; _0 = 0; if (_1 <= _2) { while (1) { if (_0) { _1++; if (!(_1 <= _2)) { break; } } else { _0 = 1; } i = _1; result *= i; } } RETURN_LONG(result); }
PHP_METHOD(Test_BuiltIn_ArrayMethods, getMap1) { zval _1, _2; zval _0; int ZEPHIR_LAST_CALL_STATUS; ZEPHIR_INIT_THIS(); ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); ZVAL_UNDEF(&_2); ZEPHIR_MM_GROW(); ZEPHIR_INIT_VAR(&_0); zephir_create_array(&_0, 3, 0 TSRMLS_CC); ZEPHIR_INIT_VAR(&_1); ZVAL_LONG(&_1, 1); zephir_array_fast_append(&_0, &_1); ZEPHIR_INIT_NVAR(&_1); ZVAL_LONG(&_1, 2); zephir_array_fast_append(&_0, &_1); ZEPHIR_INIT_NVAR(&_1); ZVAL_LONG(&_1, 3); zephir_array_fast_append(&_0, &_1); ZEPHIR_INIT_NVAR(&_1); ZEPHIR_INIT_NVAR(&_1); zephir_create_closure_ex(&_1, NULL, test_0__closure_ce, SL("__invoke")); ZEPHIR_CALL_FUNCTION(&_2, "array_map", NULL, 3, &_1, &_0); zephir_check_call_status(); RETURN_CCTOR(_2); }
/** * @link https://github.com/phalcon/zephir/issues/287 */ PHP_METHOD(Test_Pregmatch, testPregMatchSaveMatches) { zval *str_param = NULL, *pattern_param = NULL, matches, _0; zval str, pattern; ZEPHIR_INIT_THIS(); ZVAL_UNDEF(&str); ZVAL_UNDEF(&pattern); ZVAL_UNDEF(&matches); ZVAL_UNDEF(&_0); ZEPHIR_MM_GROW(); zephir_fetch_params(1, 2, 0, &str_param, &pattern_param); zephir_get_strval(&str, str_param); zephir_get_strval(&pattern, pattern_param); ZEPHIR_INIT_VAR(&matches); ZVAL_NULL(&matches); ZEPHIR_INIT_VAR(&_0); zephir_preg_match(&_0, &pattern, &str, &matches, 0, 0 , 0 TSRMLS_CC); RETURN_CCTOR(matches); }
PHP_METHOD(Test_McallInternal, d) { zval _3$$3; zend_bool _0; int ZEPHIR_LAST_CALL_STATUS, a, i = 0, _1, _2; ZEPHIR_INIT_THIS(); ZVAL_UNDEF(&_3$$3); ZEPHIR_MM_GROW(); a = 0; _2 = 1000000; _1 = 0; _0 = 0; if (_1 <= _2) { while (1) { if (_0) { _1++; if (!(_1 <= _2)) { break; } } else { _0 = 1; } i = _1; ZEPHIR_CALL_INTERNAL_METHOD_P0(&_3$$3, this_ptr, zep_Test_McallInternal_a); zephir_check_call_status(); a += zephir_get_intval(&_3$$3); } } RETURN_MM_LONG(a); }
PHP_METHOD(Test_Pregmatch, testMatchAll) { int ZEPHIR_LAST_CALL_STATUS; zval *flags, flags_sub, text, matches, _0; ZEPHIR_INIT_THIS(); ZVAL_UNDEF(&flags_sub); ZVAL_UNDEF(&text); ZVAL_UNDEF(&matches); ZVAL_UNDEF(&_0); ZEPHIR_MM_GROW(); zephir_fetch_params(1, 1, 0, &flags); ZEPHIR_INIT_VAR(&matches); array_init(&matches); ZEPHIR_INIT_VAR(&text); ZVAL_STRING(&text, "test1,test2"); ZEPHIR_INIT_VAR(&_0); ZVAL_STRING(&_0, "/(test[0-9]+)/"); ZEPHIR_MAKE_REF(&matches); ZEPHIR_CALL_FUNCTION(NULL, "preg_match_all", NULL, 53, &_0, &text, &matches, flags); ZEPHIR_UNREF(&matches); zephir_check_call_status(); RETURN_CCTOR(matches); }
PHP_METHOD(Test_Concat, testConcatSelf1) { zval _1; zval url, _0, _2; ZEPHIR_INIT_THIS(); ZVAL_UNDEF(&url); ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_2); ZVAL_UNDEF(&_1); ZEPHIR_MM_GROW(); ZEPHIR_INIT_VAR(&url); ZVAL_STRING(&url, ""); zephir_concat_self_str(&url, SL("test") TSRMLS_CC); ZEPHIR_INIT_VAR(&_0); ZEPHIR_CONCAT_SVS(&_0, "append", &url, "other"); zephir_concat_self(&url, &_0 TSRMLS_CC); ZEPHIR_INIT_VAR(&_1); ZEPHIR_CONCAT_SS(&_1, "append", "other"); zephir_concat_self(&url, &_1 TSRMLS_CC); ZEPHIR_INIT_VAR(&_2); ZEPHIR_CONCAT_SSV(&_2, "append", "other", &url); zephir_concat_self(&url, &_2 TSRMLS_CC); RETURN_CCTOR(url); }
PHP_METHOD(Test_Pregmatch, testMatchAllInZep) { zval m1, m2, _0; zephir_fcall_cache_entry *_1 = NULL; int ZEPHIR_LAST_CALL_STATUS; ZEPHIR_INIT_THIS(); ZVAL_UNDEF(&m1); ZVAL_UNDEF(&m2); ZVAL_UNDEF(&_0); ZEPHIR_MM_GROW(); ZVAL_LONG(&_0, 1); ZEPHIR_CALL_METHOD(&m1, this_ptr, "testmatchall", &_1, 0, &_0); zephir_check_call_status(); ZVAL_LONG(&_0, 2); ZEPHIR_CALL_METHOD(&m2, this_ptr, "testmatchall", &_1, 0, &_0); zephir_check_call_status(); zephir_create_array(return_value, 2, 0 TSRMLS_CC); zephir_array_fast_append(return_value, &m1); zephir_array_fast_append(return_value, &m2); RETURN_MM(); }
PHP_METHOD(Test_Pregmatch, testPregMatchFallback) { zval pattern, subject, matches, _0, _1; int ZEPHIR_LAST_CALL_STATUS; ZEPHIR_INIT_THIS(); ZVAL_UNDEF(&pattern); ZVAL_UNDEF(&subject); ZVAL_UNDEF(&matches); ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); ZEPHIR_MM_GROW(); ZEPHIR_INIT_VAR(&matches); ZVAL_NULL(&matches); ZEPHIR_INIT_NVAR(&matches); array_init(&matches); ZEPHIR_INIT_VAR(&pattern); ZVAL_STRING(&pattern, "/def$/"); ZEPHIR_INIT_VAR(&subject); ZVAL_STRING(&subject, "abcdef"); ZVAL_LONG(&_0, 0); ZVAL_LONG(&_1, 0); ZEPHIR_MAKE_REF(&matches); ZEPHIR_RETURN_CALL_FUNCTION("preg_match", NULL, 52, &pattern, &subject, &matches, &_0, &_1); ZEPHIR_UNREF(&matches); zephir_check_call_status(); RETURN_MM(); }
PHP_METHOD(Test_Flow, testFor1) { int c = 0; zval v, b, _0, *_1; ZEPHIR_INIT_THIS(); ZVAL_UNDEF(&v); ZVAL_UNDEF(&b); ZVAL_UNDEF(&_0); ZEPHIR_MM_GROW(); c = 0; ZEPHIR_INIT_VAR(&b); zephir_create_array(&b, 4, 0 TSRMLS_CC); ZEPHIR_INIT_VAR(&_0); ZVAL_LONG(&_0, 1); zephir_array_fast_append(&b, &_0); ZEPHIR_INIT_NVAR(&_0); ZVAL_LONG(&_0, 2); zephir_array_fast_append(&b, &_0); ZEPHIR_INIT_NVAR(&_0); ZVAL_LONG(&_0, 3); zephir_array_fast_append(&b, &_0); ZEPHIR_INIT_NVAR(&_0); ZVAL_LONG(&_0, 4); zephir_array_fast_append(&b, &_0); zephir_is_iterable(&b, 0, "test/flow.zep", 443); ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(&b), _1) { ZEPHIR_INIT_NVAR(&v); ZVAL_COPY(&v, _1); c += zephir_get_numberval(&v); } ZEND_HASH_FOREACH_END();
PHP_METHOD(Test_Flow, testWhileDoNextTest) { int ZEPHIR_LAST_CALL_STATUS; zephir_fcall_cache_entry *_1 = NULL, *_3 = NULL; zval *variable, variable_sub, returnValue, _2, _0$$3; ZEPHIR_INIT_THIS(); ZVAL_UNDEF(&variable_sub); ZVAL_UNDEF(&returnValue); ZVAL_UNDEF(&_2); ZVAL_UNDEF(&_0$$3); ZEPHIR_MM_GROW(); zephir_fetch_params(1, 1, 0, &variable); ZEPHIR_INIT_VAR(&returnValue); array_init(&returnValue); do { ZEPHIR_CALL_FUNCTION(&_0$$3, "current", &_1, 38, variable); zephir_check_call_status(); zephir_array_append(&returnValue, &_0$$3, PH_SEPARATE, "test/flow.zep", 430); ZEPHIR_MAKE_REF(variable); ZEPHIR_CALL_FUNCTION(&_2, "next", &_3, 37, variable); ZEPHIR_UNREF(variable); zephir_check_call_status(); } while (zephir_is_true(&_2)); RETURN_CCTOR(returnValue); }
PHP_METHOD(Test_BuiltIn_ArrayMethods, getJoin1) { zval _1; zval _0; ZEPHIR_INIT_THIS(); ZVAL_UNDEF(&_0); ZVAL_UNDEF(&_1); ZEPHIR_MM_GROW(); ZEPHIR_INIT_VAR(&_0); zephir_create_array(&_0, 3, 0 TSRMLS_CC); ZEPHIR_INIT_VAR(&_1); ZVAL_LONG(&_1, 1); zephir_array_fast_append(&_0, &_1); ZEPHIR_INIT_NVAR(&_1); ZVAL_LONG(&_1, 2); zephir_array_fast_append(&_0, &_1); ZEPHIR_INIT_NVAR(&_1); ZVAL_LONG(&_1, 3); zephir_array_fast_append(&_0, &_1); ZEPHIR_INIT_NVAR(&_1); zephir_fast_join_str(&_1, SL("-"), &_0 TSRMLS_CC); RETURN_CCTOR(_1); }
PHP_METHOD(Test_Flow, testWhile11) { double c = 0; int b = 0; zval *a, a_sub, *d, d_sub; ZEPHIR_INIT_THIS(); ZVAL_UNDEF(&a_sub); ZVAL_UNDEF(&d_sub); ZEPHIR_MM_GROW(); zephir_fetch_params(1, 2, 0, &a, &d); ZEPHIR_SEPARATE_PARAM(a); b = 0; while (1) { if (!(zephir_is_true(a))) { break; } b = zephir_get_numberval(d); while (1) { if (!(b)) { break; } b--; } ZEPHIR_SEPARATE(a); zephir_decrement(a); } c = (double) ((zephir_get_numberval(a) + b)); RETURN_MM_DOUBLE(c); }
PHP_METHOD(Test_Flow, testWhile13) { zval _0; int a; zval b; ZEPHIR_INIT_THIS(); ZVAL_UNDEF(&b); ZVAL_UNDEF(&_0); ZEPHIR_MM_GROW(); a = 5; ZEPHIR_INIT_VAR(&_0); ZEPHIR_CONCAT_SS(&_0, "+", "10"); ZEPHIR_CPY_WRT(&b, &_0); while (1) { if (!(ZEPHIR_GT_LONG(&b, a))) { break; } ZEPHIR_SEPARATE(&b); zephir_decrement(&b); } RETURN_CCTOR(b); }
PHP_METHOD(Test_Flow, testWhile9) { double c = 0; int a = 0, b = 0; ZEPHIR_INIT_THIS(); a = 5; b = 0; while (1) { if (!(a)) { break; } b = 5; while (1) { if (!(b)) { break; } b--; } a--; } c = (double) ((a + b)); RETURN_DOUBLE(c); }
PHP_METHOD(Test_Flow, testIf12) { zend_bool c = 0; double b = 0; int a = 0; ZEPHIR_INIT_THIS(); a = 1; if (a) { b = (double) (1); if (b) { c = ((1) ? 1 : 0); if (c) { RETURN_LONG(987); } else { RETURN_LONG(0); } } else { RETURN_LONG(0); } } else { RETURN_LONG(0); } }
PHP_METHOD(Test_UseTest, count) { ZEPHIR_INIT_THIS(); }
/** * Returns the paths using positions as keys and names as values * * @return array */ PHP_METHOD(Test_Router_Route, getReversedPaths) { zend_string *_3; zend_ulong _2; zval reversed, path, position, _0, *_1; ZEPHIR_INIT_THIS(); ZVAL_UNDEF(&reversed); ZVAL_UNDEF(&path); ZVAL_UNDEF(&position); ZVAL_UNDEF(&_0); ZEPHIR_MM_GROW(); ZEPHIR_INIT_VAR(&reversed); array_init(&reversed); zephir_read_property(&_0, this_ptr, SL("_paths"), PH_NOISY_CC | PH_READONLY); zephir_is_iterable(&_0, 0, "test/router/route.zep", 478); ZEND_HASH_FOREACH_KEY_VAL(Z_ARRVAL_P(&_0), _2, _3, _1) { ZEPHIR_INIT_NVAR(&path); if (_3 != NULL) { ZVAL_STR_COPY(&path, _3); } else { ZVAL_LONG(&path, _2); } ZEPHIR_INIT_NVAR(&position); ZVAL_COPY(&position, _1); zephir_array_update_zval(&reversed, &position, &path, PH_COPY | PH_SEPARATE); } ZEND_HASH_FOREACH_END();
/** * Returns the paths * * @return array */ PHP_METHOD(Test_Router_Route, getPaths) { ZEPHIR_INIT_THIS(); RETURN_MEMBER(this_ptr, "_paths"); }