Patch bug65845.patch for opcache Bug #65845
Patch version 2013-10-10 04:29 UTC
Return to Bug #65845 |
Download this patch
Patch Revisions:
Developer: laruence@php.net
diff --git a/ext/opcache/Optimizer/block_pass.c b/ext/opcache/Optimizer/block_pass.c
index 1c34cff..2b1c875 100644
--- a/ext/opcache/Optimizer/block_pass.c
+++ b/ext/opcache/Optimizer/block_pass.c
@@ -663,6 +663,7 @@ static void zend_optimize_block(zend_code_block *block, zend_op_array *op_array,
converted to long at compile time */
if (opline->opcode == ZEND_ADD_ARRAY_ELEMENT ||
opline->opcode == ZEND_INIT_ARRAY ||
+ opline->opcode == ZEND_ASSIGN_DIM ||
opline->opcode == ZEND_UNSET_DIM ||
opline->opcode == ZEND_ISSET_ISEMPTY_DIM_OBJ ||
opline->opcode == ZEND_FETCH_DIM_R ||
@@ -695,7 +696,11 @@ static void zend_optimize_block(zend_code_block *block, zend_op_array *op_array,
if (numeric) {
zval_dtor(&ZEND_OP2_LITERAL(opline));
ZVAL_LONG(&ZEND_OP2_LITERAL(opline), index);
- }
+ } else if (IS_INTERNED(Z_STRVAL(ZEND_OP2_LITERAL(opline)))) {
+ Z_HASH_P(&ZEND_OP2_LITERAL(opline)) = INTERNED_HASH(Z_STRVAL(ZEND_OP2_LITERAL(opline)));
+ } else {
+ Z_HASH_P(&ZEND_OP2_LITERAL(opline)) = zend_hash_func(Z_STRVAL(ZEND_OP2_LITERAL(opline)), Z_STRLEN(ZEND_OP2_LITERAL(opline))+1);
+ }
}
}
#endif
|