Improve fast_is_[not_]identical() functions to teturn value instead of takeing additional arguments.

Pair INSTANCEOF with the following JMPZ/JMPNZ.
This commit is contained in:
Dmitry Stogov 2015-04-29 16:43:23 +03:00
parent 1d718fe859
commit d880ead8a7
6 changed files with 279 additions and 175 deletions

View File

@ -1885,60 +1885,47 @@ static int hash_zval_identical_function(zval *z1, zval *z2) /* {{{ */
}
/* }}} */
ZEND_API int ZEND_FASTCALL is_identical_function(zval *result, zval *op1, zval *op2) /* {{{ */
ZEND_API int ZEND_FASTCALL zend_is_identical(zval *op1, zval *op2) /* {{{ */
{
if (Z_TYPE_P(op1) != Z_TYPE_P(op2)) {
ZVAL_FALSE(result);
return SUCCESS;
return 0;
}
switch (Z_TYPE_P(op1)) {
case IS_NULL:
case IS_FALSE:
case IS_TRUE:
ZVAL_TRUE(result);
break;
return 1;
case IS_LONG:
ZVAL_BOOL(result, Z_LVAL_P(op1) == Z_LVAL_P(op2));
break;
return (Z_LVAL_P(op1) == Z_LVAL_P(op2));
case IS_RESOURCE:
ZVAL_BOOL(result, Z_RES_P(op1) == Z_RES_P(op2));
break;
return (Z_RES_P(op1) == Z_RES_P(op2));
case IS_DOUBLE:
ZVAL_BOOL(result, Z_DVAL_P(op1) == Z_DVAL_P(op2));
break;
return (Z_DVAL_P(op1) == Z_DVAL_P(op2));
case IS_STRING:
if (Z_STR_P(op1) == Z_STR_P(op2)) {
ZVAL_TRUE(result);
} else {
ZVAL_BOOL(result, (Z_STRLEN_P(op1) == Z_STRLEN_P(op2))
&& (!memcmp(Z_STRVAL_P(op1), Z_STRVAL_P(op2), Z_STRLEN_P(op1))));
}
break;
return (Z_STR_P(op1) == Z_STR_P(op2) ||
(Z_STRLEN_P(op1) == Z_STRLEN_P(op2) &&
memcmp(Z_STRVAL_P(op1), Z_STRVAL_P(op2), Z_STRLEN_P(op1)) == 0));
case IS_ARRAY:
ZVAL_BOOL(result, Z_ARRVAL_P(op1) == Z_ARRVAL_P(op2) ||
zend_hash_compare(Z_ARRVAL_P(op1), Z_ARRVAL_P(op2), (compare_func_t) hash_zval_identical_function, 1)==0);
break;
return (Z_ARRVAL_P(op1) == Z_ARRVAL_P(op2) ||
zend_hash_compare(Z_ARRVAL_P(op1), Z_ARRVAL_P(op2), (compare_func_t) hash_zval_identical_function, 1) == 0);
case IS_OBJECT:
if (Z_OBJ_HT_P(op1) == Z_OBJ_HT_P(op2)) {
ZVAL_BOOL(result, Z_OBJ_P(op1) == Z_OBJ_P(op2));
} else {
ZVAL_FALSE(result);
}
break;
return (Z_OBJ_P(op1) == Z_OBJ_P(op2) && Z_OBJ_HT_P(op1) == Z_OBJ_HT_P(op2));
default:
ZVAL_FALSE(result);
return FAILURE;
return 0;
}
}
/* }}} */
ZEND_API int ZEND_FASTCALL is_identical_function(zval *result, zval *op1, zval *op2) /* {{{ */
{
ZVAL_BOOL(result, zend_is_identical(op1, op2));
return SUCCESS;
}
/* }}} */
ZEND_API int ZEND_FASTCALL is_not_identical_function(zval *result, zval *op1, zval *op2) /* {{{ */
{
if (is_identical_function(result, op1, op2) == FAILURE) {
return FAILURE;
}
ZVAL_BOOL(result, Z_TYPE_P(result) != IS_TRUE);
ZVAL_BOOL(result, !zend_is_identical(op1, op2));
return SUCCESS;
}
/* }}} */

View File

@ -60,6 +60,8 @@ ZEND_API int ZEND_FASTCALL shift_left_function(zval *result, zval *op1, zval *op
ZEND_API int ZEND_FASTCALL shift_right_function(zval *result, zval *op1, zval *op2);
ZEND_API int ZEND_FASTCALL concat_function(zval *result, zval *op1, zval *op2);
ZEND_API int ZEND_FASTCALL zend_is_identical(zval *op1, zval *op2);
ZEND_API int ZEND_FASTCALL is_equal_function(zval *result, zval *op1, zval *op2);
ZEND_API int ZEND_FASTCALL is_identical_function(zval *result, zval *op1, zval *op2);
ZEND_API int ZEND_FASTCALL is_not_identical_function(zval *result, zval *op1, zval *op2);
@ -842,23 +844,20 @@ static zend_always_inline int fast_equal_check_string(zval *op1, zval *op2)
return Z_LVAL(result) == 0;
}
static zend_always_inline void fast_is_identical_function(zval *result, zval *op1, zval *op2)
static zend_always_inline int fast_is_identical_function(zval *op1, zval *op2)
{
if (Z_TYPE_P(op1) != Z_TYPE_P(op2)) {
ZVAL_FALSE(result);
return;
return 0;
}
is_identical_function(result, op1, op2);
return zend_is_identical(op1, op2);
}
static zend_always_inline void fast_is_not_identical_function(zval *result, zval *op1, zval *op2)
static zend_always_inline int fast_is_not_identical_function(zval *op1, zval *op2)
{
if (Z_TYPE_P(op1) != Z_TYPE_P(op2)) {
ZVAL_TRUE(result);
return;
return 1;
}
is_identical_function(result, op1, op2);
ZVAL_BOOL(result, Z_TYPE_P(result) != IS_TRUE);
return !zend_is_identical(op1, op2);
}
#define ZEND_TRY_BINARY_OP1_OBJECT_OPERATION(opcode, binary_op) \

View File

@ -263,15 +263,19 @@ ZEND_VM_HANDLER(15, ZEND_IS_IDENTICAL, CONST|TMP|VAR|CV, CONST|TMP|VAR|CV)
{
USE_OPLINE
zend_free_op free_op1, free_op2;
int result;
SAVE_OPLINE();
fast_is_identical_function(EX_VAR(opline->result.var),
result = fast_is_identical_function(
GET_OP1_ZVAL_PTR_DEREF(BP_VAR_R),
GET_OP2_ZVAL_PTR_DEREF(BP_VAR_R));
FREE_OP1();
FREE_OP2();
ZEND_VM_SMART_BRANCH(Z_TYPE_INFO_P(EX_VAR(opline->result.var)) == IS_TRUE, 1);
CHECK_EXCEPTION();
ZEND_VM_SMART_BRANCH(result, (OP1_TYPE|OP2_TYPE) & (IS_VAR|IS_TMP_VAR));
ZVAL_BOOL(EX_VAR(opline->result.var), result);
if ((OP1_TYPE|OP2_TYPE) & (IS_VAR|IS_TMP_VAR)) {
CHECK_EXCEPTION();
}
ZEND_VM_NEXT_OPCODE();
}
@ -279,16 +283,19 @@ ZEND_VM_HANDLER(16, ZEND_IS_NOT_IDENTICAL, CONST|TMP|VAR|CV, CONST|TMP|VAR|CV)
{
USE_OPLINE
zend_free_op free_op1, free_op2;
zval *result = EX_VAR(opline->result.var);
int result;
SAVE_OPLINE();
fast_is_not_identical_function(result,
result = fast_is_not_identical_function(
GET_OP1_ZVAL_PTR_DEREF(BP_VAR_R),
GET_OP2_ZVAL_PTR_DEREF(BP_VAR_R));
FREE_OP1();
FREE_OP2();
ZEND_VM_SMART_BRANCH(Z_TYPE_INFO_P(EX_VAR(opline->result.var)) == IS_TRUE, 1);
CHECK_EXCEPTION();
ZEND_VM_SMART_BRANCH(result, (OP1_TYPE|OP2_TYPE) & (IS_VAR|IS_TMP_VAR));
ZVAL_BOOL(EX_VAR(opline->result.var), result);
if ((OP1_TYPE|OP2_TYPE) & (IS_VAR|IS_TMP_VAR)) {
CHECK_EXCEPTION();
}
ZEND_VM_NEXT_OPCODE();
}
@ -6915,8 +6922,9 @@ ZEND_VM_C_LABEL(try_instanceof):
} else {
result = 0;
}
ZVAL_BOOL(EX_VAR(opline->result.var), result);
FREE_OP1();
ZEND_VM_SMART_BRANCH(result, 1);
ZVAL_BOOL(EX_VAR(opline->result.var), result);
CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}

View File

@ -4503,15 +4503,19 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_IDENTICAL_SPEC_CONST_CONST_
{
USE_OPLINE
int result;
SAVE_OPLINE();
fast_is_identical_function(EX_VAR(opline->result.var),
result = fast_is_identical_function(
EX_CONSTANT(opline->op1),
EX_CONSTANT(opline->op2));
ZEND_VM_SMART_BRANCH(Z_TYPE_INFO_P(EX_VAR(opline->result.var)) == IS_TRUE, 1);
CHECK_EXCEPTION();
ZEND_VM_SMART_BRANCH(result, (IS_CONST|IS_CONST) & (IS_VAR|IS_TMP_VAR));
ZVAL_BOOL(EX_VAR(opline->result.var), result);
if ((IS_CONST|IS_CONST) & (IS_VAR|IS_TMP_VAR)) {
CHECK_EXCEPTION();
}
ZEND_VM_NEXT_OPCODE();
}
@ -4519,16 +4523,19 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_NOT_IDENTICAL_SPEC_CONST_CO
{
USE_OPLINE
zval *result = EX_VAR(opline->result.var);
int result;
SAVE_OPLINE();
fast_is_not_identical_function(result,
result = fast_is_not_identical_function(
EX_CONSTANT(opline->op1),
EX_CONSTANT(opline->op2));
ZEND_VM_SMART_BRANCH(Z_TYPE_INFO_P(EX_VAR(opline->result.var)) == IS_TRUE, 1);
CHECK_EXCEPTION();
ZEND_VM_SMART_BRANCH(result, (IS_CONST|IS_CONST) & (IS_VAR|IS_TMP_VAR));
ZVAL_BOOL(EX_VAR(opline->result.var), result);
if ((IS_CONST|IS_CONST) & (IS_VAR|IS_TMP_VAR)) {
CHECK_EXCEPTION();
}
ZEND_VM_NEXT_OPCODE();
}
@ -6520,15 +6527,19 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_IDENTICAL_SPEC_CONST_TMP_HA
{
USE_OPLINE
zend_free_op free_op2;
int result;
SAVE_OPLINE();
fast_is_identical_function(EX_VAR(opline->result.var),
result = fast_is_identical_function(
EX_CONSTANT(opline->op1),
_get_zval_ptr_tmp(opline->op2.var, execute_data, &free_op2));
zval_ptr_dtor_nogc(free_op2);
ZEND_VM_SMART_BRANCH(Z_TYPE_INFO_P(EX_VAR(opline->result.var)) == IS_TRUE, 1);
CHECK_EXCEPTION();
ZEND_VM_SMART_BRANCH(result, (IS_CONST|IS_TMP_VAR) & (IS_VAR|IS_TMP_VAR));
ZVAL_BOOL(EX_VAR(opline->result.var), result);
if ((IS_CONST|IS_TMP_VAR) & (IS_VAR|IS_TMP_VAR)) {
CHECK_EXCEPTION();
}
ZEND_VM_NEXT_OPCODE();
}
@ -6536,16 +6547,19 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_NOT_IDENTICAL_SPEC_CONST_TM
{
USE_OPLINE
zend_free_op free_op2;
zval *result = EX_VAR(opline->result.var);
int result;
SAVE_OPLINE();
fast_is_not_identical_function(result,
result = fast_is_not_identical_function(
EX_CONSTANT(opline->op1),
_get_zval_ptr_tmp(opline->op2.var, execute_data, &free_op2));
zval_ptr_dtor_nogc(free_op2);
ZEND_VM_SMART_BRANCH(Z_TYPE_INFO_P(EX_VAR(opline->result.var)) == IS_TRUE, 1);
CHECK_EXCEPTION();
ZEND_VM_SMART_BRANCH(result, (IS_CONST|IS_TMP_VAR) & (IS_VAR|IS_TMP_VAR));
ZVAL_BOOL(EX_VAR(opline->result.var), result);
if ((IS_CONST|IS_TMP_VAR) & (IS_VAR|IS_TMP_VAR)) {
CHECK_EXCEPTION();
}
ZEND_VM_NEXT_OPCODE();
}
@ -6690,15 +6704,19 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_IDENTICAL_SPEC_CONST_VAR_HA
{
USE_OPLINE
zend_free_op free_op2;
int result;
SAVE_OPLINE();
fast_is_identical_function(EX_VAR(opline->result.var),
result = fast_is_identical_function(
EX_CONSTANT(opline->op1),
_get_zval_ptr_var_deref(opline->op2.var, execute_data, &free_op2));
zval_ptr_dtor_nogc(free_op2);
ZEND_VM_SMART_BRANCH(Z_TYPE_INFO_P(EX_VAR(opline->result.var)) == IS_TRUE, 1);
CHECK_EXCEPTION();
ZEND_VM_SMART_BRANCH(result, (IS_CONST|IS_VAR) & (IS_VAR|IS_TMP_VAR));
ZVAL_BOOL(EX_VAR(opline->result.var), result);
if ((IS_CONST|IS_VAR) & (IS_VAR|IS_TMP_VAR)) {
CHECK_EXCEPTION();
}
ZEND_VM_NEXT_OPCODE();
}
@ -6706,16 +6724,19 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_NOT_IDENTICAL_SPEC_CONST_VA
{
USE_OPLINE
zend_free_op free_op2;
zval *result = EX_VAR(opline->result.var);
int result;
SAVE_OPLINE();
fast_is_not_identical_function(result,
result = fast_is_not_identical_function(
EX_CONSTANT(opline->op1),
_get_zval_ptr_var_deref(opline->op2.var, execute_data, &free_op2));
zval_ptr_dtor_nogc(free_op2);
ZEND_VM_SMART_BRANCH(Z_TYPE_INFO_P(EX_VAR(opline->result.var)) == IS_TRUE, 1);
CHECK_EXCEPTION();
ZEND_VM_SMART_BRANCH(result, (IS_CONST|IS_VAR) & (IS_VAR|IS_TMP_VAR));
ZVAL_BOOL(EX_VAR(opline->result.var), result);
if ((IS_CONST|IS_VAR) & (IS_VAR|IS_TMP_VAR)) {
CHECK_EXCEPTION();
}
ZEND_VM_NEXT_OPCODE();
}
@ -8348,15 +8369,19 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_IDENTICAL_SPEC_CONST_CV_HAN
{
USE_OPLINE
int result;
SAVE_OPLINE();
fast_is_identical_function(EX_VAR(opline->result.var),
result = fast_is_identical_function(
EX_CONSTANT(opline->op1),
_get_zval_ptr_cv_deref_BP_VAR_R(execute_data, opline->op2.var));
ZEND_VM_SMART_BRANCH(Z_TYPE_INFO_P(EX_VAR(opline->result.var)) == IS_TRUE, 1);
CHECK_EXCEPTION();
ZEND_VM_SMART_BRANCH(result, (IS_CONST|IS_CV) & (IS_VAR|IS_TMP_VAR));
ZVAL_BOOL(EX_VAR(opline->result.var), result);
if ((IS_CONST|IS_CV) & (IS_VAR|IS_TMP_VAR)) {
CHECK_EXCEPTION();
}
ZEND_VM_NEXT_OPCODE();
}
@ -8364,16 +8389,19 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_NOT_IDENTICAL_SPEC_CONST_CV
{
USE_OPLINE
zval *result = EX_VAR(opline->result.var);
int result;
SAVE_OPLINE();
fast_is_not_identical_function(result,
result = fast_is_not_identical_function(
EX_CONSTANT(opline->op1),
_get_zval_ptr_cv_deref_BP_VAR_R(execute_data, opline->op2.var));
ZEND_VM_SMART_BRANCH(Z_TYPE_INFO_P(EX_VAR(opline->result.var)) == IS_TRUE, 1);
CHECK_EXCEPTION();
ZEND_VM_SMART_BRANCH(result, (IS_CONST|IS_CV) & (IS_VAR|IS_TMP_VAR));
ZVAL_BOOL(EX_VAR(opline->result.var), result);
if ((IS_CONST|IS_CV) & (IS_VAR|IS_TMP_VAR)) {
CHECK_EXCEPTION();
}
ZEND_VM_NEXT_OPCODE();
}
@ -12286,15 +12314,19 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_IDENTICAL_SPEC_TMP_CONST_HA
{
USE_OPLINE
zend_free_op free_op1;
int result;
SAVE_OPLINE();
fast_is_identical_function(EX_VAR(opline->result.var),
result = fast_is_identical_function(
_get_zval_ptr_tmp(opline->op1.var, execute_data, &free_op1),
EX_CONSTANT(opline->op2));
zval_ptr_dtor_nogc(free_op1);
ZEND_VM_SMART_BRANCH(Z_TYPE_INFO_P(EX_VAR(opline->result.var)) == IS_TRUE, 1);
CHECK_EXCEPTION();
ZEND_VM_SMART_BRANCH(result, (IS_TMP_VAR|IS_CONST) & (IS_VAR|IS_TMP_VAR));
ZVAL_BOOL(EX_VAR(opline->result.var), result);
if ((IS_TMP_VAR|IS_CONST) & (IS_VAR|IS_TMP_VAR)) {
CHECK_EXCEPTION();
}
ZEND_VM_NEXT_OPCODE();
}
@ -12302,16 +12334,19 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_NOT_IDENTICAL_SPEC_TMP_CONS
{
USE_OPLINE
zend_free_op free_op1;
zval *result = EX_VAR(opline->result.var);
int result;
SAVE_OPLINE();
fast_is_not_identical_function(result,
result = fast_is_not_identical_function(
_get_zval_ptr_tmp(opline->op1.var, execute_data, &free_op1),
EX_CONSTANT(opline->op2));
zval_ptr_dtor_nogc(free_op1);
ZEND_VM_SMART_BRANCH(Z_TYPE_INFO_P(EX_VAR(opline->result.var)) == IS_TRUE, 1);
CHECK_EXCEPTION();
ZEND_VM_SMART_BRANCH(result, (IS_TMP_VAR|IS_CONST) & (IS_VAR|IS_TMP_VAR));
ZVAL_BOOL(EX_VAR(opline->result.var), result);
if ((IS_TMP_VAR|IS_CONST) & (IS_VAR|IS_TMP_VAR)) {
CHECK_EXCEPTION();
}
ZEND_VM_NEXT_OPCODE();
}
@ -12809,15 +12844,19 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_IDENTICAL_SPEC_TMP_TMP_HAND
{
USE_OPLINE
zend_free_op free_op1, free_op2;
int result;
SAVE_OPLINE();
fast_is_identical_function(EX_VAR(opline->result.var),
result = fast_is_identical_function(
_get_zval_ptr_tmp(opline->op1.var, execute_data, &free_op1),
_get_zval_ptr_tmp(opline->op2.var, execute_data, &free_op2));
zval_ptr_dtor_nogc(free_op1);
zval_ptr_dtor_nogc(free_op2);
ZEND_VM_SMART_BRANCH(Z_TYPE_INFO_P(EX_VAR(opline->result.var)) == IS_TRUE, 1);
CHECK_EXCEPTION();
ZEND_VM_SMART_BRANCH(result, (IS_TMP_VAR|IS_TMP_VAR) & (IS_VAR|IS_TMP_VAR));
ZVAL_BOOL(EX_VAR(opline->result.var), result);
if ((IS_TMP_VAR|IS_TMP_VAR) & (IS_VAR|IS_TMP_VAR)) {
CHECK_EXCEPTION();
}
ZEND_VM_NEXT_OPCODE();
}
@ -12825,16 +12864,19 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_NOT_IDENTICAL_SPEC_TMP_TMP_
{
USE_OPLINE
zend_free_op free_op1, free_op2;
zval *result = EX_VAR(opline->result.var);
int result;
SAVE_OPLINE();
fast_is_not_identical_function(result,
result = fast_is_not_identical_function(
_get_zval_ptr_tmp(opline->op1.var, execute_data, &free_op1),
_get_zval_ptr_tmp(opline->op2.var, execute_data, &free_op2));
zval_ptr_dtor_nogc(free_op1);
zval_ptr_dtor_nogc(free_op2);
ZEND_VM_SMART_BRANCH(Z_TYPE_INFO_P(EX_VAR(opline->result.var)) == IS_TRUE, 1);
CHECK_EXCEPTION();
ZEND_VM_SMART_BRANCH(result, (IS_TMP_VAR|IS_TMP_VAR) & (IS_VAR|IS_TMP_VAR));
ZVAL_BOOL(EX_VAR(opline->result.var), result);
if ((IS_TMP_VAR|IS_TMP_VAR) & (IS_VAR|IS_TMP_VAR)) {
CHECK_EXCEPTION();
}
ZEND_VM_NEXT_OPCODE();
}
@ -12979,15 +13021,19 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_IDENTICAL_SPEC_TMP_VAR_HAND
{
USE_OPLINE
zend_free_op free_op1, free_op2;
int result;
SAVE_OPLINE();
fast_is_identical_function(EX_VAR(opline->result.var),
result = fast_is_identical_function(
_get_zval_ptr_tmp(opline->op1.var, execute_data, &free_op1),
_get_zval_ptr_var_deref(opline->op2.var, execute_data, &free_op2));
zval_ptr_dtor_nogc(free_op1);
zval_ptr_dtor_nogc(free_op2);
ZEND_VM_SMART_BRANCH(Z_TYPE_INFO_P(EX_VAR(opline->result.var)) == IS_TRUE, 1);
CHECK_EXCEPTION();
ZEND_VM_SMART_BRANCH(result, (IS_TMP_VAR|IS_VAR) & (IS_VAR|IS_TMP_VAR));
ZVAL_BOOL(EX_VAR(opline->result.var), result);
if ((IS_TMP_VAR|IS_VAR) & (IS_VAR|IS_TMP_VAR)) {
CHECK_EXCEPTION();
}
ZEND_VM_NEXT_OPCODE();
}
@ -12995,16 +13041,19 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_NOT_IDENTICAL_SPEC_TMP_VAR_
{
USE_OPLINE
zend_free_op free_op1, free_op2;
zval *result = EX_VAR(opline->result.var);
int result;
SAVE_OPLINE();
fast_is_not_identical_function(result,
result = fast_is_not_identical_function(
_get_zval_ptr_tmp(opline->op1.var, execute_data, &free_op1),
_get_zval_ptr_var_deref(opline->op2.var, execute_data, &free_op2));
zval_ptr_dtor_nogc(free_op1);
zval_ptr_dtor_nogc(free_op2);
ZEND_VM_SMART_BRANCH(Z_TYPE_INFO_P(EX_VAR(opline->result.var)) == IS_TRUE, 1);
CHECK_EXCEPTION();
ZEND_VM_SMART_BRANCH(result, (IS_TMP_VAR|IS_VAR) & (IS_VAR|IS_TMP_VAR));
ZVAL_BOOL(EX_VAR(opline->result.var), result);
if ((IS_TMP_VAR|IS_VAR) & (IS_VAR|IS_TMP_VAR)) {
CHECK_EXCEPTION();
}
ZEND_VM_NEXT_OPCODE();
}
@ -13513,15 +13562,19 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_IDENTICAL_SPEC_TMP_CV_HANDL
{
USE_OPLINE
zend_free_op free_op1;
int result;
SAVE_OPLINE();
fast_is_identical_function(EX_VAR(opline->result.var),
result = fast_is_identical_function(
_get_zval_ptr_tmp(opline->op1.var, execute_data, &free_op1),
_get_zval_ptr_cv_deref_BP_VAR_R(execute_data, opline->op2.var));
zval_ptr_dtor_nogc(free_op1);
ZEND_VM_SMART_BRANCH(Z_TYPE_INFO_P(EX_VAR(opline->result.var)) == IS_TRUE, 1);
CHECK_EXCEPTION();
ZEND_VM_SMART_BRANCH(result, (IS_TMP_VAR|IS_CV) & (IS_VAR|IS_TMP_VAR));
ZVAL_BOOL(EX_VAR(opline->result.var), result);
if ((IS_TMP_VAR|IS_CV) & (IS_VAR|IS_TMP_VAR)) {
CHECK_EXCEPTION();
}
ZEND_VM_NEXT_OPCODE();
}
@ -13529,16 +13582,19 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_NOT_IDENTICAL_SPEC_TMP_CV_H
{
USE_OPLINE
zend_free_op free_op1;
zval *result = EX_VAR(opline->result.var);
int result;
SAVE_OPLINE();
fast_is_not_identical_function(result,
result = fast_is_not_identical_function(
_get_zval_ptr_tmp(opline->op1.var, execute_data, &free_op1),
_get_zval_ptr_cv_deref_BP_VAR_R(execute_data, opline->op2.var));
zval_ptr_dtor_nogc(free_op1);
ZEND_VM_SMART_BRANCH(Z_TYPE_INFO_P(EX_VAR(opline->result.var)) == IS_TRUE, 1);
CHECK_EXCEPTION();
ZEND_VM_SMART_BRANCH(result, (IS_TMP_VAR|IS_CV) & (IS_VAR|IS_TMP_VAR));
ZVAL_BOOL(EX_VAR(opline->result.var), result);
if ((IS_TMP_VAR|IS_CV) & (IS_VAR|IS_TMP_VAR)) {
CHECK_EXCEPTION();
}
ZEND_VM_NEXT_OPCODE();
}
@ -16013,15 +16069,19 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_IDENTICAL_SPEC_VAR_CONST_HA
{
USE_OPLINE
zend_free_op free_op1;
int result;
SAVE_OPLINE();
fast_is_identical_function(EX_VAR(opline->result.var),
result = fast_is_identical_function(
_get_zval_ptr_var_deref(opline->op1.var, execute_data, &free_op1),
EX_CONSTANT(opline->op2));
zval_ptr_dtor_nogc(free_op1);
ZEND_VM_SMART_BRANCH(Z_TYPE_INFO_P(EX_VAR(opline->result.var)) == IS_TRUE, 1);
CHECK_EXCEPTION();
ZEND_VM_SMART_BRANCH(result, (IS_VAR|IS_CONST) & (IS_VAR|IS_TMP_VAR));
ZVAL_BOOL(EX_VAR(opline->result.var), result);
if ((IS_VAR|IS_CONST) & (IS_VAR|IS_TMP_VAR)) {
CHECK_EXCEPTION();
}
ZEND_VM_NEXT_OPCODE();
}
@ -16029,16 +16089,19 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_NOT_IDENTICAL_SPEC_VAR_CONS
{
USE_OPLINE
zend_free_op free_op1;
zval *result = EX_VAR(opline->result.var);
int result;
SAVE_OPLINE();
fast_is_not_identical_function(result,
result = fast_is_not_identical_function(
_get_zval_ptr_var_deref(opline->op1.var, execute_data, &free_op1),
EX_CONSTANT(opline->op2));
zval_ptr_dtor_nogc(free_op1);
ZEND_VM_SMART_BRANCH(Z_TYPE_INFO_P(EX_VAR(opline->result.var)) == IS_TRUE, 1);
CHECK_EXCEPTION();
ZEND_VM_SMART_BRANCH(result, (IS_VAR|IS_CONST) & (IS_VAR|IS_TMP_VAR));
ZVAL_BOOL(EX_VAR(opline->result.var), result);
if ((IS_VAR|IS_CONST) & (IS_VAR|IS_TMP_VAR)) {
CHECK_EXCEPTION();
}
ZEND_VM_NEXT_OPCODE();
}
@ -17814,15 +17877,19 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_IDENTICAL_SPEC_VAR_TMP_HAND
{
USE_OPLINE
zend_free_op free_op1, free_op2;
int result;
SAVE_OPLINE();
fast_is_identical_function(EX_VAR(opline->result.var),
result = fast_is_identical_function(
_get_zval_ptr_var_deref(opline->op1.var, execute_data, &free_op1),
_get_zval_ptr_tmp(opline->op2.var, execute_data, &free_op2));
zval_ptr_dtor_nogc(free_op1);
zval_ptr_dtor_nogc(free_op2);
ZEND_VM_SMART_BRANCH(Z_TYPE_INFO_P(EX_VAR(opline->result.var)) == IS_TRUE, 1);
CHECK_EXCEPTION();
ZEND_VM_SMART_BRANCH(result, (IS_VAR|IS_TMP_VAR) & (IS_VAR|IS_TMP_VAR));
ZVAL_BOOL(EX_VAR(opline->result.var), result);
if ((IS_VAR|IS_TMP_VAR) & (IS_VAR|IS_TMP_VAR)) {
CHECK_EXCEPTION();
}
ZEND_VM_NEXT_OPCODE();
}
@ -17830,16 +17897,19 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_NOT_IDENTICAL_SPEC_VAR_TMP_
{
USE_OPLINE
zend_free_op free_op1, free_op2;
zval *result = EX_VAR(opline->result.var);
int result;
SAVE_OPLINE();
fast_is_not_identical_function(result,
result = fast_is_not_identical_function(
_get_zval_ptr_var_deref(opline->op1.var, execute_data, &free_op1),
_get_zval_ptr_tmp(opline->op2.var, execute_data, &free_op2));
zval_ptr_dtor_nogc(free_op1);
zval_ptr_dtor_nogc(free_op2);
ZEND_VM_SMART_BRANCH(Z_TYPE_INFO_P(EX_VAR(opline->result.var)) == IS_TRUE, 1);
CHECK_EXCEPTION();
ZEND_VM_SMART_BRANCH(result, (IS_VAR|IS_TMP_VAR) & (IS_VAR|IS_TMP_VAR));
ZVAL_BOOL(EX_VAR(opline->result.var), result);
if ((IS_VAR|IS_TMP_VAR) & (IS_VAR|IS_TMP_VAR)) {
CHECK_EXCEPTION();
}
ZEND_VM_NEXT_OPCODE();
}
@ -18014,15 +18084,19 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_IDENTICAL_SPEC_VAR_VAR_HAND
{
USE_OPLINE
zend_free_op free_op1, free_op2;
int result;
SAVE_OPLINE();
fast_is_identical_function(EX_VAR(opline->result.var),
result = fast_is_identical_function(
_get_zval_ptr_var_deref(opline->op1.var, execute_data, &free_op1),
_get_zval_ptr_var_deref(opline->op2.var, execute_data, &free_op2));
zval_ptr_dtor_nogc(free_op1);
zval_ptr_dtor_nogc(free_op2);
ZEND_VM_SMART_BRANCH(Z_TYPE_INFO_P(EX_VAR(opline->result.var)) == IS_TRUE, 1);
CHECK_EXCEPTION();
ZEND_VM_SMART_BRANCH(result, (IS_VAR|IS_VAR) & (IS_VAR|IS_TMP_VAR));
ZVAL_BOOL(EX_VAR(opline->result.var), result);
if ((IS_VAR|IS_VAR) & (IS_VAR|IS_TMP_VAR)) {
CHECK_EXCEPTION();
}
ZEND_VM_NEXT_OPCODE();
}
@ -18030,16 +18104,19 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_NOT_IDENTICAL_SPEC_VAR_VAR_
{
USE_OPLINE
zend_free_op free_op1, free_op2;
zval *result = EX_VAR(opline->result.var);
int result;
SAVE_OPLINE();
fast_is_not_identical_function(result,
result = fast_is_not_identical_function(
_get_zval_ptr_var_deref(opline->op1.var, execute_data, &free_op1),
_get_zval_ptr_var_deref(opline->op2.var, execute_data, &free_op2));
zval_ptr_dtor_nogc(free_op1);
zval_ptr_dtor_nogc(free_op2);
ZEND_VM_SMART_BRANCH(Z_TYPE_INFO_P(EX_VAR(opline->result.var)) == IS_TRUE, 1);
CHECK_EXCEPTION();
ZEND_VM_SMART_BRANCH(result, (IS_VAR|IS_VAR) & (IS_VAR|IS_TMP_VAR));
ZVAL_BOOL(EX_VAR(opline->result.var), result);
if ((IS_VAR|IS_VAR) & (IS_VAR|IS_TMP_VAR)) {
CHECK_EXCEPTION();
}
ZEND_VM_NEXT_OPCODE();
}
@ -19239,15 +19316,19 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_IDENTICAL_SPEC_VAR_CV_HANDL
{
USE_OPLINE
zend_free_op free_op1;
int result;
SAVE_OPLINE();
fast_is_identical_function(EX_VAR(opline->result.var),
result = fast_is_identical_function(
_get_zval_ptr_var_deref(opline->op1.var, execute_data, &free_op1),
_get_zval_ptr_cv_deref_BP_VAR_R(execute_data, opline->op2.var));
zval_ptr_dtor_nogc(free_op1);
ZEND_VM_SMART_BRANCH(Z_TYPE_INFO_P(EX_VAR(opline->result.var)) == IS_TRUE, 1);
CHECK_EXCEPTION();
ZEND_VM_SMART_BRANCH(result, (IS_VAR|IS_CV) & (IS_VAR|IS_TMP_VAR));
ZVAL_BOOL(EX_VAR(opline->result.var), result);
if ((IS_VAR|IS_CV) & (IS_VAR|IS_TMP_VAR)) {
CHECK_EXCEPTION();
}
ZEND_VM_NEXT_OPCODE();
}
@ -19255,16 +19336,19 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_NOT_IDENTICAL_SPEC_VAR_CV_H
{
USE_OPLINE
zend_free_op free_op1;
zval *result = EX_VAR(opline->result.var);
int result;
SAVE_OPLINE();
fast_is_not_identical_function(result,
result = fast_is_not_identical_function(
_get_zval_ptr_var_deref(opline->op1.var, execute_data, &free_op1),
_get_zval_ptr_cv_deref_BP_VAR_R(execute_data, opline->op2.var));
zval_ptr_dtor_nogc(free_op1);
ZEND_VM_SMART_BRANCH(Z_TYPE_INFO_P(EX_VAR(opline->result.var)) == IS_TRUE, 1);
CHECK_EXCEPTION();
ZEND_VM_SMART_BRANCH(result, (IS_VAR|IS_CV) & (IS_VAR|IS_TMP_VAR));
ZVAL_BOOL(EX_VAR(opline->result.var), result);
if ((IS_VAR|IS_CV) & (IS_VAR|IS_TMP_VAR)) {
CHECK_EXCEPTION();
}
ZEND_VM_NEXT_OPCODE();
}
@ -29903,15 +29987,19 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_IDENTICAL_SPEC_CV_CONST_HAN
{
USE_OPLINE
int result;
SAVE_OPLINE();
fast_is_identical_function(EX_VAR(opline->result.var),
result = fast_is_identical_function(
_get_zval_ptr_cv_deref_BP_VAR_R(execute_data, opline->op1.var),
EX_CONSTANT(opline->op2));
ZEND_VM_SMART_BRANCH(Z_TYPE_INFO_P(EX_VAR(opline->result.var)) == IS_TRUE, 1);
CHECK_EXCEPTION();
ZEND_VM_SMART_BRANCH(result, (IS_CV|IS_CONST) & (IS_VAR|IS_TMP_VAR));
ZVAL_BOOL(EX_VAR(opline->result.var), result);
if ((IS_CV|IS_CONST) & (IS_VAR|IS_TMP_VAR)) {
CHECK_EXCEPTION();
}
ZEND_VM_NEXT_OPCODE();
}
@ -29919,16 +30007,19 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_NOT_IDENTICAL_SPEC_CV_CONST
{
USE_OPLINE
zval *result = EX_VAR(opline->result.var);
int result;
SAVE_OPLINE();
fast_is_not_identical_function(result,
result = fast_is_not_identical_function(
_get_zval_ptr_cv_deref_BP_VAR_R(execute_data, opline->op1.var),
EX_CONSTANT(opline->op2));
ZEND_VM_SMART_BRANCH(Z_TYPE_INFO_P(EX_VAR(opline->result.var)) == IS_TRUE, 1);
CHECK_EXCEPTION();
ZEND_VM_SMART_BRANCH(result, (IS_CV|IS_CONST) & (IS_VAR|IS_TMP_VAR));
ZVAL_BOOL(EX_VAR(opline->result.var), result);
if ((IS_CV|IS_CONST) & (IS_VAR|IS_TMP_VAR)) {
CHECK_EXCEPTION();
}
ZEND_VM_NEXT_OPCODE();
}
@ -32568,8 +32659,9 @@ try_instanceof:
} else {
result = 0;
}
ZVAL_BOOL(EX_VAR(opline->result.var), result);
ZEND_VM_SMART_BRANCH(result, 1);
ZVAL_BOOL(EX_VAR(opline->result.var), result);
CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
@ -32814,15 +32906,19 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_IDENTICAL_SPEC_CV_TMP_HANDL
{
USE_OPLINE
zend_free_op free_op2;
int result;
SAVE_OPLINE();
fast_is_identical_function(EX_VAR(opline->result.var),
result = fast_is_identical_function(
_get_zval_ptr_cv_deref_BP_VAR_R(execute_data, opline->op1.var),
_get_zval_ptr_tmp(opline->op2.var, execute_data, &free_op2));
zval_ptr_dtor_nogc(free_op2);
ZEND_VM_SMART_BRANCH(Z_TYPE_INFO_P(EX_VAR(opline->result.var)) == IS_TRUE, 1);
CHECK_EXCEPTION();
ZEND_VM_SMART_BRANCH(result, (IS_CV|IS_TMP_VAR) & (IS_VAR|IS_TMP_VAR));
ZVAL_BOOL(EX_VAR(opline->result.var), result);
if ((IS_CV|IS_TMP_VAR) & (IS_VAR|IS_TMP_VAR)) {
CHECK_EXCEPTION();
}
ZEND_VM_NEXT_OPCODE();
}
@ -32830,16 +32926,19 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_NOT_IDENTICAL_SPEC_CV_TMP_H
{
USE_OPLINE
zend_free_op free_op2;
zval *result = EX_VAR(opline->result.var);
int result;
SAVE_OPLINE();
fast_is_not_identical_function(result,
result = fast_is_not_identical_function(
_get_zval_ptr_cv_deref_BP_VAR_R(execute_data, opline->op1.var),
_get_zval_ptr_tmp(opline->op2.var, execute_data, &free_op2));
zval_ptr_dtor_nogc(free_op2);
ZEND_VM_SMART_BRANCH(Z_TYPE_INFO_P(EX_VAR(opline->result.var)) == IS_TRUE, 1);
CHECK_EXCEPTION();
ZEND_VM_SMART_BRANCH(result, (IS_CV|IS_TMP_VAR) & (IS_VAR|IS_TMP_VAR));
ZVAL_BOOL(EX_VAR(opline->result.var), result);
if ((IS_CV|IS_TMP_VAR) & (IS_VAR|IS_TMP_VAR)) {
CHECK_EXCEPTION();
}
ZEND_VM_NEXT_OPCODE();
}
@ -33013,15 +33112,19 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_IDENTICAL_SPEC_CV_VAR_HANDL
{
USE_OPLINE
zend_free_op free_op2;
int result;
SAVE_OPLINE();
fast_is_identical_function(EX_VAR(opline->result.var),
result = fast_is_identical_function(
_get_zval_ptr_cv_deref_BP_VAR_R(execute_data, opline->op1.var),
_get_zval_ptr_var_deref(opline->op2.var, execute_data, &free_op2));
zval_ptr_dtor_nogc(free_op2);
ZEND_VM_SMART_BRANCH(Z_TYPE_INFO_P(EX_VAR(opline->result.var)) == IS_TRUE, 1);
CHECK_EXCEPTION();
ZEND_VM_SMART_BRANCH(result, (IS_CV|IS_VAR) & (IS_VAR|IS_TMP_VAR));
ZVAL_BOOL(EX_VAR(opline->result.var), result);
if ((IS_CV|IS_VAR) & (IS_VAR|IS_TMP_VAR)) {
CHECK_EXCEPTION();
}
ZEND_VM_NEXT_OPCODE();
}
@ -33029,16 +33132,19 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_NOT_IDENTICAL_SPEC_CV_VAR_H
{
USE_OPLINE
zend_free_op free_op2;
zval *result = EX_VAR(opline->result.var);
int result;
SAVE_OPLINE();
fast_is_not_identical_function(result,
result = fast_is_not_identical_function(
_get_zval_ptr_cv_deref_BP_VAR_R(execute_data, opline->op1.var),
_get_zval_ptr_var_deref(opline->op2.var, execute_data, &free_op2));
zval_ptr_dtor_nogc(free_op2);
ZEND_VM_SMART_BRANCH(Z_TYPE_INFO_P(EX_VAR(opline->result.var)) == IS_TRUE, 1);
CHECK_EXCEPTION();
ZEND_VM_SMART_BRANCH(result, (IS_CV|IS_VAR) & (IS_VAR|IS_TMP_VAR));
ZVAL_BOOL(EX_VAR(opline->result.var), result);
if ((IS_CV|IS_VAR) & (IS_VAR|IS_TMP_VAR)) {
CHECK_EXCEPTION();
}
ZEND_VM_NEXT_OPCODE();
}
@ -33539,8 +33645,9 @@ try_instanceof:
} else {
result = 0;
}
ZVAL_BOOL(EX_VAR(opline->result.var), result);
ZEND_VM_SMART_BRANCH(result, 1);
ZVAL_BOOL(EX_VAR(opline->result.var), result);
CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
@ -35100,15 +35207,19 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_IDENTICAL_SPEC_CV_CV_HANDLE
{
USE_OPLINE
int result;
SAVE_OPLINE();
fast_is_identical_function(EX_VAR(opline->result.var),
result = fast_is_identical_function(
_get_zval_ptr_cv_deref_BP_VAR_R(execute_data, opline->op1.var),
_get_zval_ptr_cv_deref_BP_VAR_R(execute_data, opline->op2.var));
ZEND_VM_SMART_BRANCH(Z_TYPE_INFO_P(EX_VAR(opline->result.var)) == IS_TRUE, 1);
CHECK_EXCEPTION();
ZEND_VM_SMART_BRANCH(result, (IS_CV|IS_CV) & (IS_VAR|IS_TMP_VAR));
ZVAL_BOOL(EX_VAR(opline->result.var), result);
if ((IS_CV|IS_CV) & (IS_VAR|IS_TMP_VAR)) {
CHECK_EXCEPTION();
}
ZEND_VM_NEXT_OPCODE();
}
@ -35116,16 +35227,19 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_NOT_IDENTICAL_SPEC_CV_CV_HA
{
USE_OPLINE
zval *result = EX_VAR(opline->result.var);
int result;
SAVE_OPLINE();
fast_is_not_identical_function(result,
result = fast_is_not_identical_function(
_get_zval_ptr_cv_deref_BP_VAR_R(execute_data, opline->op1.var),
_get_zval_ptr_cv_deref_BP_VAR_R(execute_data, opline->op2.var));
ZEND_VM_SMART_BRANCH(Z_TYPE_INFO_P(EX_VAR(opline->result.var)) == IS_TRUE, 1);
CHECK_EXCEPTION();
ZEND_VM_SMART_BRANCH(result, (IS_CV|IS_CV) & (IS_VAR|IS_TMP_VAR));
ZVAL_BOOL(EX_VAR(opline->result.var), result);
if ((IS_CV|IS_CV) & (IS_VAR|IS_TMP_VAR)) {
CHECK_EXCEPTION();
}
ZEND_VM_NEXT_OPCODE();
}
@ -42034,8 +42148,9 @@ try_instanceof:
} else {
result = 0;
}
ZVAL_BOOL(EX_VAR(opline->result.var), result);
zval_ptr_dtor_nogc(free_op1);
ZEND_VM_SMART_BRANCH(result, 1);
ZVAL_BOOL(EX_VAR(opline->result.var), result);
CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
@ -42462,8 +42577,9 @@ try_instanceof:
} else {
result = 0;
}
ZVAL_BOOL(EX_VAR(opline->result.var), result);
zval_ptr_dtor_nogc(free_op1);
ZEND_VM_SMART_BRANCH(result, 1);
ZVAL_BOOL(EX_VAR(opline->result.var), result);
CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}

View File

@ -1017,7 +1017,6 @@ SPL_METHOD(MultipleIterator, attachIterator)
if (info != NULL) {
spl_SplObjectStorageElement *element;
zval compare_result;
if (Z_TYPE_P(info) != IS_LONG && Z_TYPE_P(info) != IS_STRING) {
zend_throw_exception(spl_ce_InvalidArgumentException, "Info must be NULL, integer or string", 0);
@ -1026,8 +1025,7 @@ SPL_METHOD(MultipleIterator, attachIterator)
zend_hash_internal_pointer_reset_ex(&intern->storage, &intern->pos);
while ((element = zend_hash_get_current_data_ptr_ex(&intern->storage, &intern->pos)) != NULL) {
is_identical_function(&compare_result, info, &element->inf);
if (Z_TYPE(compare_result) == IS_TRUE) {
if (fast_is_identical_function(info, &element->inf)) {
zend_throw_exception(spl_ce_InvalidArgumentException, "Key duplication error", 0);
return;
}

View File

@ -1263,11 +1263,9 @@ static inline void php_search_array(INTERNAL_FUNCTION_PARAMETERS, int behavior)
#endif
if (strict) {
zval res; /* comparison result */
ZEND_HASH_FOREACH_KEY_VAL(Z_ARRVAL_P(array), num_idx, str_idx, entry) {
ZVAL_DEREF(entry);
fast_is_identical_function(&res, value, entry);
if (Z_TYPE(res) == IS_TRUE) {
if (fast_is_identical_function(value, entry)) {
if (behavior == 0) {
RETURN_TRUE;
} else {
@ -2876,7 +2874,6 @@ PHP_FUNCTION(array_keys)
zval *input, /* Input array */
*search_value = NULL, /* Value to search for */
*entry, /* An entry in the input array */
res, /* Result of comparison */
new_val; /* New value */
zend_bool strict = 0; /* do strict comparison */
zend_ulong num_idx;
@ -2901,8 +2898,7 @@ PHP_FUNCTION(array_keys)
if (strict) {
ZEND_HASH_FOREACH_KEY_VAL_IND(Z_ARRVAL_P(input), num_idx, str_idx, entry) {
fast_is_identical_function(&res, search_value, entry);
if (Z_TYPE(res) == IS_TRUE) {
if (fast_is_identical_function(search_value, entry)) {
if (str_idx) {
ZVAL_STR_COPY(&new_val, str_idx);
} else {