ZEND_API void zend_print_zval_r_ex(zend_write_func_t write_func, zval *expr, int indent)
{
- switch(expr->type) {
+ switch (expr->type) {
case IS_ARRAY:
ZEND_PUTS("Array\n");
if (++expr->value.ht->nApplyCount>1) {
*/
int module_registry_cleanup(zend_module_entry *module TSRMLS_DC)
{
- switch(module->type) {
+ switch (module->type) {
case MODULE_PERSISTENT:
if (module->request_shutdown_func) {
#if 0
int case_sensitive;
zend_constant c;
- switch(ZEND_NUM_ARGS()) {
+ switch (ZEND_NUM_ARGS()) {
case 2:
if (zend_get_parameters_ex(2, &var, &val)==FAILURE) {
RETURN_FALSE;
break;
}
- switch((*val)->type) {
+ switch ((*val)->type) {
case IS_LONG:
case IS_DOUBLE:
case IS_STRING:
int error_type = E_USER_NOTICE;
zval **z_error_type, **z_error_message;
- switch(ZEND_NUM_ARGS()) {
+ switch (ZEND_NUM_ARGS()) {
case 1:
if (zend_get_parameters_ex(1, &z_error_message)==FAILURE) {
ZEND_WRONG_PARAM_COUNT();
if (last_op->opcode == ZEND_FETCH_OBJ_RW) {
- switch(op) {
+ switch (op) {
case ZEND_ASSIGN_ADD:
opline->opcode = ZEND_ASSIGN_ADD_OBJ;
break;
opline_ptr->op2.u.EA.type = ZEND_FETCH_LOCAL;
if (varname->op_type == IS_CONST && varname->u.constant.type == IS_STRING) {
- if(zend_hash_exists(CG(auto_globals), varname->u.constant.value.str.val, varname->u.constant.value.str.len+1)) {
+ if (zend_hash_exists(CG(auto_globals), varname->u.constant.value.str.val, varname->u.constant.value.str.len+1)) {
opline_ptr->op2.u.EA.type = ZEND_FETCH_GLOBAL;
} else {
- if(CG(active_op_array)->static_variables && zend_hash_exists(CG(active_op_array)->static_variables, varname->u.constant.value.str.val, varname->u.constant.value.str.len+1)) {
+ if (CG(active_op_array)->static_variables && zend_hash_exists(CG(active_op_array)->static_variables, varname->u.constant.value.str.val, varname->u.constant.value.str.len+1)) {
opline_ptr->op2.u.EA.type = ZEND_FETCH_STATIC;
}
}
}
if (original_op == ZEND_SEND_VAR) {
- switch(op) {
+ switch (op) {
case ZEND_SEND_VAR_NO_REF:
zend_do_end_variable_parse(BP_VAR_R, 0 TSRMLS_CC);
break;
SET_UNUSED(opline_ptr->op1); /* this means $this for objects */
opline_ptr->op2 = *property;
/* if it was usual fetch, we change it to object fetch */
- switch(opline_ptr->opcode) {
+ switch (opline_ptr->opcode) {
case ZEND_FETCH_W:
opline_ptr->opcode = ZEND_FETCH_OBJ_W;
break;
opline = get_next_op(CG(active_op_array) TSRMLS_CC);
if (dimension == tmp_dimension_llist->head) { /* first */
last_container = *expr;
- switch(expr->op_type) {
+ switch (expr->op_type) {
case IS_VAR:
opline->opcode = ZEND_FETCH_DIM_R;
break;
ALLOC_ZVAL(tmp);
convert_to_string(&varname->u.constant);
- if(static_assignment) {
+ if (static_assignment) {
*tmp = static_assignment->u.constant;
} else {
INIT_ZVAL(*tmp);
zendlval->u.constant.type = IS_LONG;
retval = lex_scan(&zendlval->u.constant TSRMLS_CC);
- switch(retval) {
+ switch (retval) {
case T_COMMENT:
case T_OPEN_TAG:
case T_WHITESPACE:
static inline zval *_get_zval_ptr(znode *node, temp_variable *Ts, zval **should_free TSRMLS_DC)
{
- switch(node->op_type) {
+ switch (node->op_type) {
case IS_CONST:
*should_free = 0;
return &node->u.constant;
static inline zval **get_obj_zval_ptr_ptr(znode *op, temp_variable *Ts, int type TSRMLS_DC)
{
- if(op->op_type == IS_UNUSED) {
- if(EG(This)) {
+ if (op->op_type == IS_UNUSED) {
+ if (EG(This)) {
/* this should actually never be modified, _ptr_ptr is modified only when
the object is empty */
return &EG(This);
static inline zval *get_obj_zval_ptr(znode *op, temp_variable *Ts, zval **freeop, int type TSRMLS_DC)
{
- if(op->op_type == IS_UNUSED) {
- if(EG(This)) {
+ if (op->op_type == IS_UNUSED) {
+ if (EG(This)) {
return EG(This);
} else {
zend_error(E_ERROR, "Using $this when not in object context");
return EG(active_op_array)->static_variables;
break;
case ZEND_FETCH_STATIC_MEMBER:
- if(T(opline->op2.u.var).EA.class_entry->parent) {
+ if (T(opline->op2.u.var).EA.class_entry->parent) {
/* if inherited, try to look up */
return zend_find_inherited_static(T(opline->op2.u.var).EA.class_entry, variable);
} else {
zval ***retval = &T(result->u.var).var.ptr_ptr;
if (!container_ptr) {
- if(T(op1->u.var).EA.type == IS_STRING_OFFSET) {
+ if (T(op1->u.var).EA.type == IS_STRING_OFFSET) {
zval *offset;
zend_error(E_WARNING, "Cannot use string offset as an array");
zval *value, *value2;
value = get_zval_ptr(&EX(opline)->op1, EX(Ts), &EG(free_op1), BP_VAR_R);
- switch(EX(opline)->op1.op_type) {
+ switch (EX(opline)->op1.op_type) {
case IS_TMP_VAR:
value2 = value;
ALLOC_ZVAL(value);
}
}
if (offset) {
- switch(offset->type) {
+ switch (offset->type) {
case IS_DOUBLE:
zend_hash_index_update(array_ptr->value.ht, (long) offset->value.dval, &expr_ptr, sizeof(zval *), NULL);
break;
if (!zend_is_executing(TSRMLS_C)) {
return NULL;
}
- switch(EG(function_state_ptr)->function->type) {
+ switch (EG(function_state_ptr)->function->type) {
case ZEND_USER_FUNCTION: {
char *function_name = ((zend_op_array *) EG(function_state_ptr)->function)->function_name;
default:
if (token.type==0) {
/* keyword */
- switch(token_type) {
+ switch (token_type) {
case ',':
ZEND_PUTS(", ");
goto dflt_printout;
}
if (zend_hash_find(zobj->properties, Z_STRVAL_P(member), Z_STRLEN_P(member)+1, (void **) &variable_ptr) == SUCCESS) {
- if(*variable_ptr == value) {
+ if (*variable_ptr == value) {
/* if we already have this value there, we don't actually need to do anything */
setter_done = 1;
} else {
ZEND_API unary_op_type get_unary_op(int opcode)
{
- switch(opcode) {
+ switch (opcode) {
case ZEND_BW_NOT:
return (unary_op_type) bitwise_not_function;
break;
{
TSRMLS_FETCH();
- switch(op->type) {
+ switch (op->type) {
case IS_ARRAY:
return;
break;
ZEND_API void convert_to_object(zval *op)
{
- switch(op->type) {
+ switch (op->type) {
case IS_ARRAY:
{
/* OBJECTS_OPTIMIZE */
op1->type = IS_LONG;
break;
}
- switch(is_numeric_string(op1->value.str.val, op1->value.str.len, &lval, &dval, 0)) {
+ switch (is_numeric_string(op1->value.str.val, op1->value.str.len, &lval, &dval, 0)) {
case IS_LONG:
STR_FREE(op1->value.str.val);
if (lval == LONG_MIN) {
register char *ptr=str, *end=str+length;
while (ptr<end) {
- switch(*ptr++) {
+ switch (*ptr++) {
case 'e':
case 'E':
/* scientific notation, not handled by the BC library */
if (zvalue->type==IS_LONG) {
return;
}
- switch(zvalue->type & ~IS_CONSTANT_INDEX) {
+ switch (zvalue->type & ~IS_CONSTANT_INDEX) {
case IS_STRING:
case IS_CONSTANT:
CHECK_ZVAL_STRING_REL(zvalue);