switch (is_numeric_ex(Z_STR_P(zv), &lval, &dval)) {
case IS_LONG: if (types & MAY_BE_LONG) { ZVAL_LONG(zv, lval); break; }
case IS_DOUBLE: if (types & MAY_BE_DOUBLE) { ZVAL_DOUBLE(zv, dval); } else if (types & MAY_BE_LONG) { ZVAL_LONG(zv, lval); break; }
default: if (types & MAY_BE_BOOL) { convert_to_bool(zv); } else if (types & MAY_BE_LONG) { ZVAL_LONG(zv, 0);} else { convert_to_double(zv); } }
}