PHP_METHOD(Test_ExitDie, testDie) { zend_bool _0; zval *param = NULL; ZEPHIR_MM_GROW(); zephir_fetch_params(1, 0, 1, ¶m); if (!param) { ZEPHIR_INIT_VAR(param); ZVAL_STRING(param, "", 1); } _0 = Z_TYPE_P(param) == IS_STRING; if (_0) { _0 = ZEPHIR_IS_STRING(param, ""); } if (_0) { zephir_exit_empty(); ZEPHIR_MM_RESTORE(); } else { zephir_exit(param); ZEPHIR_MM_RESTORE(); } ZEPHIR_MM_RESTORE(); }
PHP_METHOD(Lynx_DBAL_Driver_PgSQL, prepare) { int ZEPHIR_LAST_CALL_STATUS; zval *statement, *e = NULL, *_0, *_1 = NULL; ZEPHIR_MM_GROW(); zephir_fetch_params(1, 1, 0, &statement); ZEPHIR_CALL_METHOD(NULL, this_ptr, "connect", NULL); zephir_check_call_status(); /* try_start_1: */ _0 = zephir_fetch_nproperty_this(this_ptr, SL("connection"), PH_NOISY_CC); ZEPHIR_RETURN_CALL_METHOD(_0, "prepare", NULL, statement); zephir_check_call_status_or_jump(try_end_1); RETURN_MM(); try_end_1: if (EG(exception)) { ZEPHIR_CPY_WRT(e, EG(exception)); if (zephir_instance_of_ev(e, zend_exception_get_default(TSRMLS_C) TSRMLS_CC)) { zend_clear_exception(TSRMLS_C); ZEPHIR_CALL_METHOD(&_1, e, "getmessage", NULL); zephir_check_call_status(); zephir_var_dump(&_1 TSRMLS_CC); zephir_exit_empty(); ZEPHIR_MM_RESTORE(); } } }
void zephir_exit(zval *ptr) { if (Z_TYPE_P(ptr) == IS_LONG) { EG(exit_status) = Z_LVAL_P(ptr); } else { zend_print_variable(ptr); } zephir_exit_empty(); }
/** * Execute query and return result */ PHP_METHOD(Lynx_DBAL_Driver_PgSQL, execute) { int ZEPHIR_LAST_CALL_STATUS; zval *query_param = NULL, *e = NULL, *_0, *_1 = NULL; zval *query = NULL; ZEPHIR_MM_GROW(); zephir_fetch_params(1, 1, 0, &query_param); if (unlikely(Z_TYPE_P(query_param) != IS_STRING && Z_TYPE_P(query_param) != IS_NULL)) { zephir_throw_exception_string(spl_ce_InvalidArgumentException, SL("Parameter 'query' must be a string") TSRMLS_CC); RETURN_MM_NULL(); } if (likely(Z_TYPE_P(query_param) == IS_STRING)) { zephir_get_strval(query, query_param); } else { ZEPHIR_INIT_VAR(query); ZVAL_EMPTY_STRING(query); } ZEPHIR_CALL_METHOD(NULL, this_ptr, "connect", NULL); zephir_check_call_status(); /* try_start_1: */ _0 = zephir_fetch_nproperty_this(this_ptr, SL("connection"), PH_NOISY_CC); ZEPHIR_RETURN_CALL_METHOD(_0, "exec", NULL, query); zephir_check_call_status_or_jump(try_end_1); RETURN_MM(); try_end_1: if (EG(exception)) { ZEPHIR_CPY_WRT(e, EG(exception)); if (zephir_instance_of_ev(e, zend_exception_get_default(TSRMLS_C) TSRMLS_CC)) { zend_clear_exception(TSRMLS_C); ZEPHIR_CALL_METHOD(&_1, e, "getmessage", NULL); zephir_check_call_status(); zephir_var_dump(&_1 TSRMLS_CC); zephir_exit_empty(); ZEPHIR_MM_RESTORE(); } } }