summaryrefslogtreecommitdiff
path: root/Zend/zend_vm_execute.h
diff options
context:
space:
mode:
authorNikita Popov <nikita.ppv@gmail.com>2019-04-11 10:48:52 +0200
committerNikita Popov <nikita.ppv@gmail.com>2019-04-11 10:48:52 +0200
commit30df87f77d87d446afbfa4c9d2e0a1a643cc4bdc (patch)
treeaa3304a339354c468ec4cdaa94c49fe1be922ca6 /Zend/zend_vm_execute.h
parentb213f13a2621ec553beec06d3e2f163c1e7e2282 (diff)
downloadphp-git-30df87f77d87d446afbfa4c9d2e0a1a643cc4bdc.tar.gz
Generate ZEND_COUNT for sizeof()
sizeof() is an alias of count(), so we should generate the same code for them.
Diffstat (limited to 'Zend/zend_vm_execute.h')
-rw-r--r--Zend/zend_vm_execute.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/Zend/zend_vm_execute.h b/Zend/zend_vm_execute.h
index 05c6101bcc..7977a2a4a0 100644
--- a/Zend/zend_vm_execute.h
+++ b/Zend/zend_vm_execute.h
@@ -9588,7 +9588,7 @@ static ZEND_VM_COLD ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_COUNT_SPEC_CONST_
} else {
count = 1;
}
- zend_error(E_WARNING, "count(): Parameter must be an array or an object that implements Countable");
+ zend_error(E_WARNING, "%s(): Parameter must be an array or an object that implements Countable", opline->extended_value ? "sizeof" : "count");
} while (0);
ZVAL_LONG(EX_VAR(opline->result.var), count);
@@ -20293,7 +20293,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_COUNT_SPEC_TMP_UNUSED_HANDLER(
} else {
count = 1;
}
- zend_error(E_WARNING, "count(): Parameter must be an array or an object that implements Countable");
+ zend_error(E_WARNING, "%s(): Parameter must be an array or an object that implements Countable", opline->extended_value ? "sizeof" : "count");
} while (0);
ZVAL_LONG(EX_VAR(opline->result.var), count);
@@ -29522,7 +29522,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_COUNT_SPEC_VAR_UNUSED_HANDLER(
} else {
count = 1;
}
- zend_error(E_WARNING, "count(): Parameter must be an array or an object that implements Countable");
+ zend_error(E_WARNING, "%s(): Parameter must be an array or an object that implements Countable", opline->extended_value ? "sizeof" : "count");
} while (0);
ZVAL_LONG(EX_VAR(opline->result.var), count);
@@ -50779,7 +50779,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_COUNT_SPEC_CV_UNUSED_HANDLER(Z
} else {
count = 1;
}
- zend_error(E_WARNING, "count(): Parameter must be an array or an object that implements Countable");
+ zend_error(E_WARNING, "%s(): Parameter must be an array or an object that implements Countable", opline->extended_value ? "sizeof" : "count");
} while (0);
ZVAL_LONG(EX_VAR(opline->result.var), count);