diff options
-rw-r--r-- | NEWS | 10 | ||||
-rw-r--r-- | README.md | 11 | ||||
-rw-r--r-- | Zend/zend_builtin_functions.c | 15 | ||||
-rw-r--r-- | Zend/zend_vm_def.h | 28 | ||||
-rw-r--r-- | Zend/zend_vm_execute.h | 336 | ||||
-rw-r--r-- | ext/odbc/php_odbc_includes.h | 2 | ||||
-rw-r--r-- | ext/opcache/README | 4 | ||||
-rw-r--r-- | ext/opcache/zend_accelerator_module.c | 2 | ||||
-rw-r--r-- | ext/standard/array.c | 37 | ||||
-rw-r--r-- | sapi/fpm/fpm/fpm_sockets.h | 2 | ||||
-rw-r--r-- | sapi/fpm/php-fpm.conf.in | 4 |
11 files changed, 230 insertions, 221 deletions
@@ -3,11 +3,21 @@ PHP NEWS ?? ??? 2013, PHP 5.5.6 - Core: + . Improved performance of array_merge() and func_get_args() by eliminating + useless copying. (Dmitry) . Fixed bug #65939 (Space before ";" breaks php.ini parsing). (brainstorm at nopcode dot org) . Fixed bug #65911 (scope resolution operator - strange behavior with $this). (Bob Weinand) +-OPcache + . Increased limit for opcache.max_accelerated_files to 1,000,000. (Chris) + +- ODBC + . Fixed bug #65950 (Field name truncation if the field name is bigger than + 32 characters). (patch submitted by: michael dot y at zend dot com, Yasuo) + + 17 Oct 2013, PHP 5.5.5 - Core: @@ -17,7 +17,7 @@ See https://wiki.php.net/rfc and https://wiki.php.net/rfc/voting for more information on the process. Bug fixes **do not** require an RFC, but require a bugtracker ticket. Always -open a ticket at http://bugs.php.net and reference the bug id using #NNNNNN. +open a ticket at https://bugs.php.net and reference the bug id using #NNNNNN. Fix #55371: get_magic_quotes_gpc() throws deprecation warning @@ -28,3 +28,12 @@ open a ticket at http://bugs.php.net and reference the bug id using #NNNNNN. We do not merge pull requests directly on github. All PRs will be pulled and pushed through http://git.php.net. + + +Guidelines for contributors +=========================== +- [CODING_STANDARDS](/CODING_STANDARDS) +- [README.GIT-RULES](/README.GIT-RULES) +- [README.MAILINGLIST_RULES](/README.MAILINGLIST_RULES) +- [README.RELEASE_PROCESS](/README.RELEASE_PROCESS) + diff --git a/Zend/zend_builtin_functions.c b/Zend/zend_builtin_functions.c index 1ad64e74ea..6cbe0bc687 100644 --- a/Zend/zend_builtin_functions.c +++ b/Zend/zend_builtin_functions.c @@ -461,12 +461,17 @@ ZEND_FUNCTION(func_get_args) array_init_size(return_value, arg_count); for (i=0; i<arg_count; i++) { - zval *element; + zval *element, *arg; - ALLOC_ZVAL(element); - *element = **((zval **) (p-(arg_count-i))); - zval_copy_ctor(element); - INIT_PZVAL(element); + arg = *((zval **) (p-(arg_count-i))); + if (!Z_ISREF_P(arg)) { + element = arg; + Z_ADDREF_P(element); + } else { + ALLOC_ZVAL(element); + INIT_PZVAL_COPY(element, arg); + zval_copy_ctor(element); + } zend_hash_next_index_insert(return_value->value.ht, &element, sizeof(zval *), NULL); } } diff --git a/Zend/zend_vm_def.h b/Zend/zend_vm_def.h index 201ae49e05..c2c3ae5219 100644 --- a/Zend/zend_vm_def.h +++ b/Zend/zend_vm_def.h @@ -4453,22 +4453,22 @@ ZEND_VM_HELPER_EX(zend_isset_isempty_dim_prop_obj_handler, VAR|UNUSED|CV, CONST| { USE_OPLINE zend_free_op free_op1, free_op2; - zval **container; + zval *container; zval **value = NULL; int result = 0; ulong hval; zval *offset; SAVE_OPLINE(); - container = GET_OP1_OBJ_ZVAL_PTR_PTR(BP_VAR_IS); + container = GET_OP1_OBJ_ZVAL_PTR(BP_VAR_IS); offset = GET_OP2_ZVAL_PTR(BP_VAR_R); - if (Z_TYPE_PP(container) == IS_ARRAY && !prop_dim) { + if (Z_TYPE_P(container) == IS_ARRAY && !prop_dim) { HashTable *ht; int isset = 0; - ht = Z_ARRVAL_PP(container); + ht = Z_ARRVAL_P(container); switch (Z_TYPE_P(offset)) { case IS_DOUBLE: @@ -4487,9 +4487,7 @@ ZEND_VM_C_LABEL(num_index_prop): if (OP2_TYPE == IS_CONST) { hval = Z_HASH_P(offset); } else { - if (!prop_dim) { - ZEND_HANDLE_NUMERIC_EX(Z_STRVAL_P(offset), Z_STRLEN_P(offset)+1, hval, ZEND_VM_C_GOTO(num_index_prop)); - } + ZEND_HANDLE_NUMERIC_EX(Z_STRVAL_P(offset), Z_STRLEN_P(offset)+1, hval, ZEND_VM_C_GOTO(num_index_prop)); if (IS_INTERNED(Z_STRVAL_P(offset))) { hval = INTERNED_HASH(Z_STRVAL_P(offset)); } else { @@ -4524,20 +4522,20 @@ ZEND_VM_C_LABEL(num_index_prop): } } FREE_OP2(); - } else if (Z_TYPE_PP(container) == IS_OBJECT) { + } else if (Z_TYPE_P(container) == IS_OBJECT) { if (IS_OP2_TMP_FREE()) { MAKE_REAL_ZVAL_PTR(offset); } if (prop_dim) { - if (Z_OBJ_HT_P(*container)->has_property) { - result = Z_OBJ_HT_P(*container)->has_property(*container, offset, (opline->extended_value & ZEND_ISEMPTY) != 0, ((OP2_TYPE == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC); + if (Z_OBJ_HT_P(container)->has_property) { + result = Z_OBJ_HT_P(container)->has_property(container, offset, (opline->extended_value & ZEND_ISEMPTY) != 0, ((OP2_TYPE == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC); } else { zend_error(E_NOTICE, "Trying to check property of non-object"); result = 0; } } else { - if (Z_OBJ_HT_P(*container)->has_dimension) { - result = Z_OBJ_HT_P(*container)->has_dimension(*container, offset, (opline->extended_value & ZEND_ISEMPTY) != 0 TSRMLS_CC); + if (Z_OBJ_HT_P(container)->has_dimension) { + result = Z_OBJ_HT_P(container)->has_dimension(container, offset, (opline->extended_value & ZEND_ISEMPTY) != 0 TSRMLS_CC); } else { zend_error(E_NOTICE, "Trying to check element of non-array"); result = 0; @@ -4548,7 +4546,7 @@ ZEND_VM_C_LABEL(num_index_prop): } else { FREE_OP2(); } - } else if ((*container)->type == IS_STRING && !prop_dim) { /* string offsets */ + } else if (Z_TYPE_P(container) == IS_STRING && !prop_dim) { /* string offsets */ zval tmp; if (Z_TYPE_P(offset) != IS_LONG) { @@ -4566,11 +4564,11 @@ ZEND_VM_C_LABEL(num_index_prop): } if (Z_TYPE_P(offset) == IS_LONG) { if (opline->extended_value & ZEND_ISSET) { - if (offset->value.lval >= 0 && offset->value.lval < Z_STRLEN_PP(container)) { + if (offset->value.lval >= 0 && offset->value.lval < Z_STRLEN_P(container)) { result = 1; } } else /* if (opline->extended_value & ZEND_ISEMPTY) */ { - if (offset->value.lval >= 0 && offset->value.lval < Z_STRLEN_PP(container) && Z_STRVAL_PP(container)[offset->value.lval] != '0') { + if (offset->value.lval >= 0 && offset->value.lval < Z_STRLEN_P(container) && Z_STRVAL_P(container)[offset->value.lval] != '0') { result = 1; } } diff --git a/Zend/zend_vm_execute.h b/Zend/zend_vm_execute.h index 74a8c12d40..b21f6bf895 100644 --- a/Zend/zend_vm_execute.h +++ b/Zend/zend_vm_execute.h @@ -16074,22 +16074,22 @@ static int ZEND_FASTCALL zend_isset_isempty_dim_prop_obj_handler_SPEC_VAR_CONST( { USE_OPLINE zend_free_op free_op1; - zval **container; + zval *container; zval **value = NULL; int result = 0; ulong hval; zval *offset; SAVE_OPLINE(); - container = _get_zval_ptr_ptr_var(opline->op1.var, execute_data, &free_op1 TSRMLS_CC); + container = _get_zval_ptr_var(opline->op1.var, execute_data, &free_op1 TSRMLS_CC); offset = opline->op2.zv; - if (Z_TYPE_PP(container) == IS_ARRAY && !prop_dim) { + if (Z_TYPE_P(container) == IS_ARRAY && !prop_dim) { HashTable *ht; int isset = 0; - ht = Z_ARRVAL_PP(container); + ht = Z_ARRVAL_P(container); switch (Z_TYPE_P(offset)) { case IS_DOUBLE: @@ -16108,9 +16108,7 @@ num_index_prop: if (IS_CONST == IS_CONST) { hval = Z_HASH_P(offset); } else { - if (!prop_dim) { - ZEND_HANDLE_NUMERIC_EX(Z_STRVAL_P(offset), Z_STRLEN_P(offset)+1, hval, goto num_index_prop); - } + ZEND_HANDLE_NUMERIC_EX(Z_STRVAL_P(offset), Z_STRLEN_P(offset)+1, hval, goto num_index_prop); if (IS_INTERNED(Z_STRVAL_P(offset))) { hval = INTERNED_HASH(Z_STRVAL_P(offset)); } else { @@ -16145,20 +16143,20 @@ num_index_prop: } } - } else if (Z_TYPE_PP(container) == IS_OBJECT) { + } else if (Z_TYPE_P(container) == IS_OBJECT) { if (0) { MAKE_REAL_ZVAL_PTR(offset); } if (prop_dim) { - if (Z_OBJ_HT_P(*container)->has_property) { - result = Z_OBJ_HT_P(*container)->has_property(*container, offset, (opline->extended_value & ZEND_ISEMPTY) != 0, ((IS_CONST == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC); + if (Z_OBJ_HT_P(container)->has_property) { + result = Z_OBJ_HT_P(container)->has_property(container, offset, (opline->extended_value & ZEND_ISEMPTY) != 0, ((IS_CONST == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC); } else { zend_error(E_NOTICE, "Trying to check property of non-object"); result = 0; } } else { - if (Z_OBJ_HT_P(*container)->has_dimension) { - result = Z_OBJ_HT_P(*container)->has_dimension(*container, offset, (opline->extended_value & ZEND_ISEMPTY) != 0 TSRMLS_CC); + if (Z_OBJ_HT_P(container)->has_dimension) { + result = Z_OBJ_HT_P(container)->has_dimension(container, offset, (opline->extended_value & ZEND_ISEMPTY) != 0 TSRMLS_CC); } else { zend_error(E_NOTICE, "Trying to check element of non-array"); result = 0; @@ -16169,7 +16167,7 @@ num_index_prop: } else { } - } else if ((*container)->type == IS_STRING && !prop_dim) { /* string offsets */ + } else if (Z_TYPE_P(container) == IS_STRING && !prop_dim) { /* string offsets */ zval tmp; if (Z_TYPE_P(offset) != IS_LONG) { @@ -16187,11 +16185,11 @@ num_index_prop: } if (Z_TYPE_P(offset) == IS_LONG) { if (opline->extended_value & ZEND_ISSET) { - if (offset->value.lval >= 0 && offset->value.lval < Z_STRLEN_PP(container)) { + if (offset->value.lval >= 0 && offset->value.lval < Z_STRLEN_P(container)) { result = 1; } } else /* if (opline->extended_value & ZEND_ISEMPTY) */ { - if (offset->value.lval >= 0 && offset->value.lval < Z_STRLEN_PP(container) && Z_STRVAL_PP(container)[offset->value.lval] != '0') { + if (offset->value.lval >= 0 && offset->value.lval < Z_STRLEN_P(container) && Z_STRVAL_P(container)[offset->value.lval] != '0') { result = 1; } } @@ -18168,22 +18166,22 @@ static int ZEND_FASTCALL zend_isset_isempty_dim_prop_obj_handler_SPEC_VAR_TMP(in { USE_OPLINE zend_free_op free_op1, free_op2; - zval **container; + zval *container; zval **value = NULL; int result = 0; ulong hval; zval *offset; SAVE_OPLINE(); - container = _get_zval_ptr_ptr_var(opline->op1.var, execute_data, &free_op1 TSRMLS_CC); + container = _get_zval_ptr_var(opline->op1.var, execute_data, &free_op1 TSRMLS_CC); offset = _get_zval_ptr_tmp(opline->op2.var, execute_data, &free_op2 TSRMLS_CC); - if (Z_TYPE_PP(container) == IS_ARRAY && !prop_dim) { + if (Z_TYPE_P(container) == IS_ARRAY && !prop_dim) { HashTable *ht; int isset = 0; - ht = Z_ARRVAL_PP(container); + ht = Z_ARRVAL_P(container); switch (Z_TYPE_P(offset)) { case IS_DOUBLE: @@ -18202,9 +18200,7 @@ num_index_prop: if (IS_TMP_VAR == IS_CONST) { hval = Z_HASH_P(offset); } else { - if (!prop_dim) { - ZEND_HANDLE_NUMERIC_EX(Z_STRVAL_P(offset), Z_STRLEN_P(offset)+1, hval, goto num_index_prop); - } + ZEND_HANDLE_NUMERIC_EX(Z_STRVAL_P(offset), Z_STRLEN_P(offset)+1, hval, goto num_index_prop); if (IS_INTERNED(Z_STRVAL_P(offset))) { hval = INTERNED_HASH(Z_STRVAL_P(offset)); } else { @@ -18239,20 +18235,20 @@ num_index_prop: } } zval_dtor(free_op2.var); - } else if (Z_TYPE_PP(container) == IS_OBJECT) { + } else if (Z_TYPE_P(container) == IS_OBJECT) { if (1) { MAKE_REAL_ZVAL_PTR(offset); } if (prop_dim) { - if (Z_OBJ_HT_P(*container)->has_property) { - result = Z_OBJ_HT_P(*container)->has_property(*container, offset, (opline->extended_value & ZEND_ISEMPTY) != 0, ((IS_TMP_VAR == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC); + if (Z_OBJ_HT_P(container)->has_property) { + result = Z_OBJ_HT_P(container)->has_property(container, offset, (opline->extended_value & ZEND_ISEMPTY) != 0, ((IS_TMP_VAR == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC); } else { zend_error(E_NOTICE, "Trying to check property of non-object"); result = 0; } } else { - if (Z_OBJ_HT_P(*container)->has_dimension) { - result = Z_OBJ_HT_P(*container)->has_dimension(*container, offset, (opline->extended_value & ZEND_ISEMPTY) != 0 TSRMLS_CC); + if (Z_OBJ_HT_P(container)->has_dimension) { + result = Z_OBJ_HT_P(container)->has_dimension(container, offset, (opline->extended_value & ZEND_ISEMPTY) != 0 TSRMLS_CC); } else { zend_error(E_NOTICE, "Trying to check element of non-array"); result = 0; @@ -18263,7 +18259,7 @@ num_index_prop: } else { zval_dtor(free_op2.var); } - } else if ((*container)->type == IS_STRING && !prop_dim) { /* string offsets */ + } else if (Z_TYPE_P(container) == IS_STRING && !prop_dim) { /* string offsets */ zval tmp; if (Z_TYPE_P(offset) != IS_LONG) { @@ -18281,11 +18277,11 @@ num_index_prop: } if (Z_TYPE_P(offset) == IS_LONG) { if (opline->extended_value & ZEND_ISSET) { - if (offset->value.lval >= 0 && offset->value.lval < Z_STRLEN_PP(container)) { + if (offset->value.lval >= 0 && offset->value.lval < Z_STRLEN_P(container)) { result = 1; } } else /* if (opline->extended_value & ZEND_ISEMPTY) */ { - if (offset->value.lval >= 0 && offset->value.lval < Z_STRLEN_PP(container) && Z_STRVAL_PP(container)[offset->value.lval] != '0') { + if (offset->value.lval >= 0 && offset->value.lval < Z_STRLEN_P(container) && Z_STRVAL_P(container)[offset->value.lval] != '0') { result = 1; } } @@ -20644,22 +20640,22 @@ static int ZEND_FASTCALL zend_isset_isempty_dim_prop_obj_handler_SPEC_VAR_VAR(in { USE_OPLINE zend_free_op free_op1, free_op2; - zval **container; + zval *container; zval **value = NULL; int result = 0; ulong hval; zval *offset; SAVE_OPLINE(); - container = _get_zval_ptr_ptr_var(opline->op1.var, execute_data, &free_op1 TSRMLS_CC); + container = _get_zval_ptr_var(opline->op1.var, execute_data, &free_op1 TSRMLS_CC); offset = _get_zval_ptr_var(opline->op2.var, execute_data, &free_op2 TSRMLS_CC); - if (Z_TYPE_PP(container) == IS_ARRAY && !prop_dim) { + if (Z_TYPE_P(container) == IS_ARRAY && !prop_dim) { HashTable *ht; int isset = 0; - ht = Z_ARRVAL_PP(container); + ht = Z_ARRVAL_P(container); switch (Z_TYPE_P(offset)) { case IS_DOUBLE: @@ -20678,9 +20674,7 @@ num_index_prop: if (IS_VAR == IS_CONST) { hval = Z_HASH_P(offset); } else { - if (!prop_dim) { - ZEND_HANDLE_NUMERIC_EX(Z_STRVAL_P(offset), Z_STRLEN_P(offset)+1, hval, goto num_index_prop); - } + ZEND_HANDLE_NUMERIC_EX(Z_STRVAL_P(offset), Z_STRLEN_P(offset)+1, hval, goto num_index_prop); if (IS_INTERNED(Z_STRVAL_P(offset))) { hval = INTERNED_HASH(Z_STRVAL_P(offset)); } else { @@ -20715,20 +20709,20 @@ num_index_prop: } } if (free_op2.var) {zval_ptr_dtor(&free_op2.var);}; - } else if (Z_TYPE_PP(container) == IS_OBJECT) { + } else if (Z_TYPE_P(container) == IS_OBJECT) { if (0) { MAKE_REAL_ZVAL_PTR(offset); } if (prop_dim) { - if (Z_OBJ_HT_P(*container)->has_property) { - result = Z_OBJ_HT_P(*container)->has_property(*container, offset, (opline->extended_value & ZEND_ISEMPTY) != 0, ((IS_VAR == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC); + if (Z_OBJ_HT_P(container)->has_property) { + result = Z_OBJ_HT_P(container)->has_property(container, offset, (opline->extended_value & ZEND_ISEMPTY) != 0, ((IS_VAR == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC); } else { zend_error(E_NOTICE, "Trying to check property of non-object"); result = 0; } } else { - if (Z_OBJ_HT_P(*container)->has_dimension) { - result = Z_OBJ_HT_P(*container)->has_dimension(*container, offset, (opline->extended_value & ZEND_ISEMPTY) != 0 TSRMLS_CC); + if (Z_OBJ_HT_P(container)->has_dimension) { + result = Z_OBJ_HT_P(container)->has_dimension(container, offset, (opline->extended_value & ZEND_ISEMPTY) != 0 TSRMLS_CC); } else { zend_error(E_NOTICE, "Trying to check element of non-array"); result = 0; @@ -20739,7 +20733,7 @@ num_index_prop: } else { if (free_op2.var) {zval_ptr_dtor(&free_op2.var);}; } - } else if ((*container)->type == IS_STRING && !prop_dim) { /* string offsets */ + } else if (Z_TYPE_P(container) == IS_STRING && !prop_dim) { /* string offsets */ zval tmp; if (Z_TYPE_P(offset) != IS_LONG) { @@ -20757,11 +20751,11 @@ num_index_prop: } if (Z_TYPE_P(offset) == IS_LONG) { if (opline->extended_value & ZEND_ISSET) { - if (offset->value.lval >= 0 && offset->value.lval < Z_STRLEN_PP(container)) { + if (offset->value.lval >= 0 && offset->value.lval < Z_STRLEN_P(container)) { result = 1; } } else /* if (opline->extended_value & ZEND_ISEMPTY) */ { - if (offset->value.lval >= 0 && offset->value.lval < Z_STRLEN_PP(container) && Z_STRVAL_PP(container)[offset->value.lval] != '0') { + if (offset->value.lval >= 0 && offset->value.lval < Z_STRLEN_P(container) && Z_STRVAL_P(container)[offset->value.lval] != '0') { result = 1; } } @@ -23936,22 +23930,22 @@ static int ZEND_FASTCALL zend_isset_isempty_dim_prop_obj_handler_SPEC_VAR_CV(int { USE_OPLINE zend_free_op free_op1; - zval **container; + zval *container; zval **value = NULL; int result = 0; ulong hval; zval *offset; SAVE_OPLINE(); - container = _get_zval_ptr_ptr_var(opline->op1.var, execute_data, &free_op1 TSRMLS_CC); + container = _get_zval_ptr_var(opline->op1.var, execute_data, &free_op1 TSRMLS_CC); offset = _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op2.var TSRMLS_CC); - if (Z_TYPE_PP(container) == IS_ARRAY && !prop_dim) { + if (Z_TYPE_P(container) == IS_ARRAY && !prop_dim) { HashTable *ht; int isset = 0; - ht = Z_ARRVAL_PP(container); + ht = Z_ARRVAL_P(container); switch (Z_TYPE_P(offset)) { case IS_DOUBLE: @@ -23970,9 +23964,7 @@ num_index_prop: if (IS_CV == IS_CONST) { hval = Z_HASH_P(offset); } else { - if (!prop_dim) { - ZEND_HANDLE_NUMERIC_EX(Z_STRVAL_P(offset), Z_STRLEN_P(offset)+1, hval, goto num_index_prop); - } + ZEND_HANDLE_NUMERIC_EX(Z_STRVAL_P(offset), Z_STRLEN_P(offset)+1, hval, goto num_index_prop); if (IS_INTERNED(Z_STRVAL_P(offset))) { hval = INTERNED_HASH(Z_STRVAL_P(offset)); } else { @@ -24007,20 +23999,20 @@ num_index_prop: } } - } else if (Z_TYPE_PP(container) == IS_OBJECT) { + } else if (Z_TYPE_P(container) == IS_OBJECT) { if (0) { MAKE_REAL_ZVAL_PTR(offset); } if (prop_dim) { - if (Z_OBJ_HT_P(*container)->has_property) { - result = Z_OBJ_HT_P(*container)->has_property(*container, offset, (opline->extended_value & ZEND_ISEMPTY) != 0, ((IS_CV == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC); + if (Z_OBJ_HT_P(container)->has_property) { + result = Z_OBJ_HT_P(container)->has_property(container, offset, (opline->extended_value & ZEND_ISEMPTY) != 0, ((IS_CV == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC); } else { zend_error(E_NOTICE, "Trying to check property of non-object"); result = 0; } } else { - if (Z_OBJ_HT_P(*container)->has_dimension) { - result = Z_OBJ_HT_P(*container)->has_dimension(*container, offset, (opline->extended_value & ZEND_ISEMPTY) != 0 TSRMLS_CC); + if (Z_OBJ_HT_P(container)->has_dimension) { + result = Z_OBJ_HT_P(container)->has_dimension(container, offset, (opline->extended_value & ZEND_ISEMPTY) != 0 TSRMLS_CC); } else { zend_error(E_NOTICE, "Trying to check element of non-array"); result = 0; @@ -24031,7 +24023,7 @@ num_index_prop: } else { } - } else if ((*container)->type == IS_STRING && !prop_dim) { /* string offsets */ + } else if (Z_TYPE_P(container) == IS_STRING && !prop_dim) { /* string offsets */ zval tmp; if (Z_TYPE_P(offset) != IS_LONG) { @@ -24049,11 +24041,11 @@ num_index_prop: } if (Z_TYPE_P(offset) == IS_LONG) { if (opline->extended_value & ZEND_ISSET) { - if (offset->value.lval >= 0 && offset->value.lval < Z_STRLEN_PP(container)) { + if (offset->value.lval >= 0 && offset->value.lval < Z_STRLEN_P(container)) { result = 1; } } else /* if (opline->extended_value & ZEND_ISEMPTY) */ { - if (offset->value.lval >= 0 && offset->value.lval < Z_STRLEN_PP(container) && Z_STRVAL_PP(container)[offset->value.lval] != '0') { + if (offset->value.lval >= 0 && offset->value.lval < Z_STRLEN_P(container) && Z_STRVAL_P(container)[offset->value.lval] != '0') { result = 1; } } @@ -25440,22 +25432,22 @@ static int ZEND_FASTCALL zend_isset_isempty_dim_prop_obj_handler_SPEC_UNUSED_CON { USE_OPLINE - zval **container; + zval *container; zval **value = NULL; int result = 0; ulong hval; zval *offset; SAVE_OPLINE(); - container = _get_obj_zval_ptr_ptr_unused(TSRMLS_C); + container = _get_obj_zval_ptr_unused(TSRMLS_C); offset = opline->op2.zv; - if (Z_TYPE_PP(container) == IS_ARRAY && !prop_dim) { + if (Z_TYPE_P(container) == IS_ARRAY && !prop_dim) { HashTable *ht; int isset = 0; - ht = Z_ARRVAL_PP(container); + ht = Z_ARRVAL_P(container); switch (Z_TYPE_P(offset)) { case IS_DOUBLE: @@ -25474,9 +25466,7 @@ num_index_prop: if (IS_CONST == IS_CONST) { hval = Z_HASH_P(offset); } else { - if (!prop_dim) { - ZEND_HANDLE_NUMERIC_EX(Z_STRVAL_P(offset), Z_STRLEN_P(offset)+1, hval, goto num_index_prop); - } + ZEND_HANDLE_NUMERIC_EX(Z_STRVAL_P(offset), Z_STRLEN_P(offset)+1, hval, goto num_index_prop); if (IS_INTERNED(Z_STRVAL_P(offset))) { hval = INTERNED_HASH(Z_STRVAL_P(offset)); } else { @@ -25511,20 +25501,20 @@ num_index_prop: } } - } else if (Z_TYPE_PP(container) == IS_OBJECT) { + } else if (Z_TYPE_P(container) == IS_OBJECT) { if (0) { MAKE_REAL_ZVAL_PTR(offset); } if (prop_dim) { - if (Z_OBJ_HT_P(*container)->has_property) { - result = Z_OBJ_HT_P(*container)->has_property(*container, offset, (opline->extended_value & ZEND_ISEMPTY) != 0, ((IS_CONST == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC); + if (Z_OBJ_HT_P(container)->has_property) { + result = Z_OBJ_HT_P(container)->has_property(container, offset, (opline->extended_value & ZEND_ISEMPTY) != 0, ((IS_CONST == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC); } else { zend_error(E_NOTICE, "Trying to check property of non-object"); result = 0; } } else { - if (Z_OBJ_HT_P(*container)->has_dimension) { - result = Z_OBJ_HT_P(*container)->has_dimension(*container, offset, (opline->extended_value & ZEND_ISEMPTY) != 0 TSRMLS_CC); + if (Z_OBJ_HT_P(container)->has_dimension) { + result = Z_OBJ_HT_P(container)->has_dimension(container, offset, (opline->extended_value & ZEND_ISEMPTY) != 0 TSRMLS_CC); } else { zend_error(E_NOTICE, "Trying to check element of non-array"); result = 0; @@ -25535,7 +25525,7 @@ num_index_prop: } else { } - } else if ((*container)->type == IS_STRING && !prop_dim) { /* string offsets */ + } else if (Z_TYPE_P(container) == IS_STRING && !prop_dim) { /* string offsets */ zval tmp; if (Z_TYPE_P(offset) != IS_LONG) { @@ -25553,11 +25543,11 @@ num_index_prop: } if (Z_TYPE_P(offset) == IS_LONG) { if (opline->extended_value & ZEND_ISSET) { - if (offset->value.lval >= 0 && offset->value.lval < Z_STRLEN_PP(container)) { + if (offset->value.lval >= 0 && offset->value.lval < Z_STRLEN_P(container)) { result = 1; } } else /* if (opline->extended_value & ZEND_ISEMPTY) */ { - if (offset->value.lval >= 0 && offset->value.lval < Z_STRLEN_PP(container) && Z_STRVAL_PP(container)[offset->value.lval] != '0') { + if (offset->value.lval >= 0 && offset->value.lval < Z_STRLEN_P(container) && Z_STRVAL_P(container)[offset->value.lval] != '0') { result = 1; } } @@ -26756,22 +26746,22 @@ static int ZEND_FASTCALL zend_isset_isempty_dim_prop_obj_handler_SPEC_UNUSED_TMP { USE_OPLINE zend_free_op free_op2; - zval **container; + zval *container; zval **value = NULL; int result = 0; ulong hval; zval *offset; SAVE_OPLINE(); - container = _get_obj_zval_ptr_ptr_unused(TSRMLS_C); + container = _get_obj_zval_ptr_unused(TSRMLS_C); offset = _get_zval_ptr_tmp(opline->op2.var, execute_data, &free_op2 TSRMLS_CC); - if (Z_TYPE_PP(container) == IS_ARRAY && !prop_dim) { + if (Z_TYPE_P(container) == IS_ARRAY && !prop_dim) { HashTable *ht; int isset = 0; - ht = Z_ARRVAL_PP(container); + ht = Z_ARRVAL_P(container); switch (Z_TYPE_P(offset)) { case IS_DOUBLE: @@ -26790,9 +26780,7 @@ num_index_prop: if (IS_TMP_VAR == IS_CONST) { hval = Z_HASH_P(offset); } else { - if (!prop_dim) { - ZEND_HANDLE_NUMERIC_EX(Z_STRVAL_P(offset), Z_STRLEN_P(offset)+1, hval, goto num_index_prop); - } + ZEND_HANDLE_NUMERIC_EX(Z_STRVAL_P(offset), Z_STRLEN_P(offset)+1, hval, goto num_index_prop); if (IS_INTERNED(Z_STRVAL_P(offset))) { hval = INTERNED_HASH(Z_STRVAL_P(offset)); } else { @@ -26827,20 +26815,20 @@ num_index_prop: } } zval_dtor(free_op2.var); - } else if (Z_TYPE_PP(container) == IS_OBJECT) { + } else if (Z_TYPE_P(container) == IS_OBJECT) { if (1) { MAKE_REAL_ZVAL_PTR(offset); } if (prop_dim) { - if (Z_OBJ_HT_P(*container)->has_property) { - result = Z_OBJ_HT_P(*container)->has_property(*container, offset, (opline->extended_value & ZEND_ISEMPTY) != 0, ((IS_TMP_VAR == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC); + if (Z_OBJ_HT_P(container)->has_property) { + result = Z_OBJ_HT_P(container)->has_property(container, offset, (opline->extended_value & ZEND_ISEMPTY) != 0, ((IS_TMP_VAR == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC); } else { zend_error(E_NOTICE, "Trying to check property of non-object"); result = 0; } } else { - if (Z_OBJ_HT_P(*container)->has_dimension) { - result = Z_OBJ_HT_P(*container)->has_dimension(*container, offset, (opline->extended_value & ZEND_ISEMPTY) != 0 TSRMLS_CC); + if (Z_OBJ_HT_P(container)->has_dimension) { + result = Z_OBJ_HT_P(container)->has_dimension(container, offset, (opline->extended_value & ZEND_ISEMPTY) != 0 TSRMLS_CC); } else { zend_error(E_NOTICE, "Trying to check element of non-array"); result = 0; @@ -26851,7 +26839,7 @@ num_index_prop: } else { zval_dtor(free_op2.var); } - } else if ((*container)->type == IS_STRING && !prop_dim) { /* string offsets */ + } else if (Z_TYPE_P(container) == IS_STRING && !prop_dim) { /* string offsets */ zval tmp; if (Z_TYPE_P(offset) != IS_LONG) { @@ -26869,11 +26857,11 @@ num_index_prop: } if (Z_TYPE_P(offset) == IS_LONG) { if (opline->extended_value & ZEND_ISSET) { - if (offset->value.lval >= 0 && offset->value.lval < Z_STRLEN_PP(container)) { + if (offset->value.lval >= 0 && offset->value.lval < Z_STRLEN_P(container)) { result = 1; } } else /* if (opline->extended_value & ZEND_ISEMPTY) */ { - if (offset->value.lval >= 0 && offset->value.lval < Z_STRLEN_PP(container) && Z_STRVAL_PP(container)[offset->value.lval] != '0') { + if (offset->value.lval >= 0 && offset->value.lval < Z_STRLEN_P(container) && Z_STRVAL_P(container)[offset->value.lval] != '0') { result = 1; } } @@ -28072,22 +28060,22 @@ static int ZEND_FASTCALL zend_isset_isempty_dim_prop_obj_handler_SPEC_UNUSED_VAR { USE_OPLINE zend_free_op free_op2; - zval **container; + zval *container; zval **value = NULL; int result = 0; ulong hval; zval *offset; SAVE_OPLINE(); - container = _get_obj_zval_ptr_ptr_unused(TSRMLS_C); + container = _get_obj_zval_ptr_unused(TSRMLS_C); offset = _get_zval_ptr_var(opline->op2.var, execute_data, &free_op2 TSRMLS_CC); - if (Z_TYPE_PP(container) == IS_ARRAY && !prop_dim) { + if (Z_TYPE_P(container) == IS_ARRAY && !prop_dim) { HashTable *ht; int isset = 0; - ht = Z_ARRVAL_PP(container); + ht = Z_ARRVAL_P(container); switch (Z_TYPE_P(offset)) { case IS_DOUBLE: @@ -28106,9 +28094,7 @@ num_index_prop: if (IS_VAR == IS_CONST) { hval = Z_HASH_P(offset); } else { - if (!prop_dim) { - ZEND_HANDLE_NUMERIC_EX(Z_STRVAL_P(offset), Z_STRLEN_P(offset)+1, hval, goto num_index_prop); - } + ZEND_HANDLE_NUMERIC_EX(Z_STRVAL_P(offset), Z_STRLEN_P(offset)+1, hval, goto num_index_prop); if (IS_INTERNED(Z_STRVAL_P(offset))) { hval = INTERNED_HASH(Z_STRVAL_P(offset)); } else { @@ -28143,20 +28129,20 @@ num_index_prop: } } if (free_op2.var) {zval_ptr_dtor(&free_op2.var);}; - } else if (Z_TYPE_PP(container) == IS_OBJECT) { + } else if (Z_TYPE_P(container) == IS_OBJECT) { if (0) { MAKE_REAL_ZVAL_PTR(offset); } if (prop_dim) { - if (Z_OBJ_HT_P(*container)->has_property) { - result = Z_OBJ_HT_P(*container)->has_property(*container, offset, (opline->extended_value & ZEND_ISEMPTY) != 0, ((IS_VAR == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC); + if (Z_OBJ_HT_P(container)->has_property) { + result = Z_OBJ_HT_P(container)->has_property(container, offset, (opline->extended_value & ZEND_ISEMPTY) != 0, ((IS_VAR == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC); } else { zend_error(E_NOTICE, "Trying to check property of non-object"); result = 0; } } else { - if (Z_OBJ_HT_P(*container)->has_dimension) { - result = Z_OBJ_HT_P(*container)->has_dimension(*container, offset, (opline->extended_value & ZEND_ISEMPTY) != 0 TSRMLS_CC); + if (Z_OBJ_HT_P(container)->has_dimension) { + result = Z_OBJ_HT_P(container)->has_dimension(container, offset, (opline->extended_value & ZEND_ISEMPTY) != 0 TSRMLS_CC); } else { zend_error(E_NOTICE, "Trying to check element of non-array"); result = 0; @@ -28167,7 +28153,7 @@ num_index_prop: } else { if (free_op2.var) {zval_ptr_dtor(&free_op2.var);}; } - } else if ((*container)->type == IS_STRING && !prop_dim) { /* string offsets */ + } else if (Z_TYPE_P(container) == IS_STRING && !prop_dim) { /* string offsets */ zval tmp; if (Z_TYPE_P(offset) != IS_LONG) { @@ -28185,11 +28171,11 @@ num_index_prop: } if (Z_TYPE_P(offset) == IS_LONG) { if (opline->extended_value & ZEND_ISSET) { - if (offset->value.lval >= 0 && offset->value.lval < Z_STRLEN_PP(container)) { + if (offset->value.lval >= 0 && offset->value.lval < Z_STRLEN_P(container)) { result = 1; } } else /* if (opline->extended_value & ZEND_ISEMPTY) */ { - if (offset->value.lval >= 0 && offset->value.lval < Z_STRLEN_PP(container) && Z_STRVAL_PP(container)[offset->value.lval] != '0') { + if (offset->value.lval >= 0 && offset->value.lval < Z_STRLEN_P(container) && Z_STRVAL_P(container)[offset->value.lval] != '0') { result = 1; } } @@ -29808,22 +29794,22 @@ static int ZEND_FASTCALL zend_isset_isempty_dim_prop_obj_handler_SPEC_UNUSED_CV( { USE_OPLINE - zval **container; + zval *container; zval **value = NULL; int result = 0; ulong hval; zval *offset; SAVE_OPLINE(); - container = _get_obj_zval_ptr_ptr_unused(TSRMLS_C); + container = _get_obj_zval_ptr_unused(TSRMLS_C); offset = _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op2.var TSRMLS_CC); - if (Z_TYPE_PP(container) == IS_ARRAY && !prop_dim) { + if (Z_TYPE_P(container) == IS_ARRAY && !prop_dim) { HashTable *ht; int isset = 0; - ht = Z_ARRVAL_PP(container); + ht = Z_ARRVAL_P(container); switch (Z_TYPE_P(offset)) { case IS_DOUBLE: @@ -29842,9 +29828,7 @@ num_index_prop: if (IS_CV == IS_CONST) { hval = Z_HASH_P(offset); } else { - if (!prop_dim) { - ZEND_HANDLE_NUMERIC_EX(Z_STRVAL_P(offset), Z_STRLEN_P(offset)+1, hval, goto num_index_prop); - } + ZEND_HANDLE_NUMERIC_EX(Z_STRVAL_P(offset), Z_STRLEN_P(offset)+1, hval, goto num_index_prop); if (IS_INTERNED(Z_STRVAL_P(offset))) { hval = INTERNED_HASH(Z_STRVAL_P(offset)); } else { @@ -29879,20 +29863,20 @@ num_index_prop: } } - } else if (Z_TYPE_PP(container) == IS_OBJECT) { + } else if (Z_TYPE_P(container) == IS_OBJECT) { if (0) { MAKE_REAL_ZVAL_PTR(offset); } if (prop_dim) { - if (Z_OBJ_HT_P(*container)->has_property) { - result = Z_OBJ_HT_P(*container)->has_property(*container, offset, (opline->extended_value & ZEND_ISEMPTY) != 0, ((IS_CV == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC); + if (Z_OBJ_HT_P(container)->has_property) { + result = Z_OBJ_HT_P(container)->has_property(container, offset, (opline->extended_value & ZEND_ISEMPTY) != 0, ((IS_CV == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC); } else { zend_error(E_NOTICE, "Trying to check property of non-object"); result = 0; } } else { - if (Z_OBJ_HT_P(*container)->has_dimension) { - result = Z_OBJ_HT_P(*container)->has_dimension(*container, offset, (opline->extended_value & ZEND_ISEMPTY) != 0 TSRMLS_CC); + if (Z_OBJ_HT_P(container)->has_dimension) { + result = Z_OBJ_HT_P(container)->has_dimension(container, offset, (opline->extended_value & ZEND_ISEMPTY) != 0 TSRMLS_CC); } else { zend_error(E_NOTICE, "Trying to check element of non-array"); result = 0; @@ -29903,7 +29887,7 @@ num_index_prop: } else { } - } else if ((*container)->type == IS_STRING && !prop_dim) { /* string offsets */ + } else if (Z_TYPE_P(container) == IS_STRING && !prop_dim) { /* string offsets */ zval tmp; if (Z_TYPE_P(offset) != IS_LONG) { @@ -29921,11 +29905,11 @@ num_index_prop: } if (Z_TYPE_P(offset) == IS_LONG) { if (opline->extended_value & ZEND_ISSET) { - if (offset->value.lval >= 0 && offset->value.lval < Z_STRLEN_PP(container)) { + if (offset->value.lval >= 0 && offset->value.lval < Z_STRLEN_P(container)) { result = 1; } } else /* if (opline->extended_value & ZEND_ISEMPTY) */ { - if (offset->value.lval >= 0 && offset->value.lval < Z_STRLEN_PP(container) && Z_STRVAL_PP(container)[offset->value.lval] != '0') { + if (offset->value.lval >= 0 && offset->value.lval < Z_STRLEN_P(container) && Z_STRVAL_P(container)[offset->value.lval] != '0') { result = 1; } } @@ -33302,22 +33286,22 @@ static int ZEND_FASTCALL zend_isset_isempty_dim_prop_obj_handler_SPEC_CV_CONST(i { USE_OPLINE - zval **container; + zval *container; zval **value = NULL; int result = 0; ulong hval; zval *offset; SAVE_OPLINE(); - container = _get_zval_ptr_ptr_cv_BP_VAR_IS(execute_data, opline->op1.var TSRMLS_CC); + container = _get_zval_ptr_cv_BP_VAR_IS(execute_data, opline->op1.var TSRMLS_CC); offset = opline->op2.zv; - if (Z_TYPE_PP(container) == IS_ARRAY && !prop_dim) { + if (Z_TYPE_P(container) == IS_ARRAY && !prop_dim) { HashTable *ht; int isset = 0; - ht = Z_ARRVAL_PP(container); + ht = Z_ARRVAL_P(container); switch (Z_TYPE_P(offset)) { case IS_DOUBLE: @@ -33336,9 +33320,7 @@ num_index_prop: if (IS_CONST == IS_CONST) { hval = Z_HASH_P(offset); } else { - if (!prop_dim) { - ZEND_HANDLE_NUMERIC_EX(Z_STRVAL_P(offset), Z_STRLEN_P(offset)+1, hval, goto num_index_prop); - } + ZEND_HANDLE_NUMERIC_EX(Z_STRVAL_P(offset), Z_STRLEN_P(offset)+1, hval, goto num_index_prop); if (IS_INTERNED(Z_STRVAL_P(offset))) { hval = INTERNED_HASH(Z_STRVAL_P(offset)); } else { @@ -33373,20 +33355,20 @@ num_index_prop: } } - } else if (Z_TYPE_PP(container) == IS_OBJECT) { + } else if (Z_TYPE_P(container) == IS_OBJECT) { if (0) { MAKE_REAL_ZVAL_PTR(offset); } if (prop_dim) { - if (Z_OBJ_HT_P(*container)->has_property) { - result = Z_OBJ_HT_P(*container)->has_property(*container, offset, (opline->extended_value & ZEND_ISEMPTY) != 0, ((IS_CONST == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC); + if (Z_OBJ_HT_P(container)->has_property) { + result = Z_OBJ_HT_P(container)->has_property(container, offset, (opline->extended_value & ZEND_ISEMPTY) != 0, ((IS_CONST == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC); } else { zend_error(E_NOTICE, "Trying to check property of non-object"); result = 0; } } else { - if (Z_OBJ_HT_P(*container)->has_dimension) { - result = Z_OBJ_HT_P(*container)->has_dimension(*container, offset, (opline->extended_value & ZEND_ISEMPTY) != 0 TSRMLS_CC); + if (Z_OBJ_HT_P(container)->has_dimension) { + result = Z_OBJ_HT_P(container)->has_dimension(container, offset, (opline->extended_value & ZEND_ISEMPTY) != 0 TSRMLS_CC); } else { zend_error(E_NOTICE, "Trying to check element of non-array"); result = 0; @@ -33397,7 +33379,7 @@ num_index_prop: } else { } - } else if ((*container)->type == IS_STRING && !prop_dim) { /* string offsets */ + } else if (Z_TYPE_P(container) == IS_STRING && !prop_dim) { /* string offsets */ zval tmp; if (Z_TYPE_P(offset) != IS_LONG) { @@ -33415,11 +33397,11 @@ num_index_prop: } if (Z_TYPE_P(offset) == IS_LONG) { if (opline->extended_value & ZEND_ISSET) { - if (offset->value.lval >= 0 && offset->value.lval < Z_STRLEN_PP(container)) { + if (offset->value.lval >= 0 && offset->value.lval < Z_STRLEN_P(container)) { result = 1; } } else /* if (opline->extended_value & ZEND_ISEMPTY) */ { - if (offset->value.lval >= 0 && offset->value.lval < Z_STRLEN_PP(container) && Z_STRVAL_PP(container)[offset->value.lval] != '0') { + if (offset->value.lval >= 0 && offset->value.lval < Z_STRLEN_P(container) && Z_STRVAL_P(container)[offset->value.lval] != '0') { result = 1; } } @@ -35258,22 +35240,22 @@ static int ZEND_FASTCALL zend_isset_isempty_dim_prop_obj_handler_SPEC_CV_TMP(int { USE_OPLINE zend_free_op free_op2; - zval **container; + zval *container; zval **value = NULL; int result = 0; ulong hval; zval *offset; SAVE_OPLINE(); - container = _get_zval_ptr_ptr_cv_BP_VAR_IS(execute_data, opline->op1.var TSRMLS_CC); + container = _get_zval_ptr_cv_BP_VAR_IS(execute_data, opline->op1.var TSRMLS_CC); offset = _get_zval_ptr_tmp(opline->op2.var, execute_data, &free_op2 TSRMLS_CC); - if (Z_TYPE_PP(container) == IS_ARRAY && !prop_dim) { + if (Z_TYPE_P(container) == IS_ARRAY && !prop_dim) { HashTable *ht; int isset = 0; - ht = Z_ARRVAL_PP(container); + ht = Z_ARRVAL_P(container); switch (Z_TYPE_P(offset)) { case IS_DOUBLE: @@ -35292,9 +35274,7 @@ num_index_prop: if (IS_TMP_VAR == IS_CONST) { hval = Z_HASH_P(offset); } else { - if (!prop_dim) { - ZEND_HANDLE_NUMERIC_EX(Z_STRVAL_P(offset), Z_STRLEN_P(offset)+1, hval, goto num_index_prop); - } + ZEND_HANDLE_NUMERIC_EX(Z_STRVAL_P(offset), Z_STRLEN_P(offset)+1, hval, goto num_index_prop); if (IS_INTERNED(Z_STRVAL_P(offset))) { hval = INTERNED_HASH(Z_STRVAL_P(offset)); } else { @@ -35329,20 +35309,20 @@ num_index_prop: } } zval_dtor(free_op2.var); - } else if (Z_TYPE_PP(container) == IS_OBJECT) { + } else if (Z_TYPE_P(container) == IS_OBJECT) { if (1) { MAKE_REAL_ZVAL_PTR(offset); } if (prop_dim) { - if (Z_OBJ_HT_P(*container)->has_property) { - result = Z_OBJ_HT_P(*container)->has_property(*container, offset, (opline->extended_value & ZEND_ISEMPTY) != 0, ((IS_TMP_VAR == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC); + if (Z_OBJ_HT_P(container)->has_property) { + result = Z_OBJ_HT_P(container)->has_property(container, offset, (opline->extended_value & ZEND_ISEMPTY) != 0, ((IS_TMP_VAR == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC); } else { zend_error(E_NOTICE, "Trying to check property of non-object"); result = 0; } } else { - if (Z_OBJ_HT_P(*container)->has_dimension) { - result = Z_OBJ_HT_P(*container)->has_dimension(*container, offset, (opline->extended_value & ZEND_ISEMPTY) != 0 TSRMLS_CC); + if (Z_OBJ_HT_P(container)->has_dimension) { + result = Z_OBJ_HT_P(container)->has_dimension(container, offset, (opline->extended_value & ZEND_ISEMPTY) != 0 TSRMLS_CC); } else { zend_error(E_NOTICE, "Trying to check element of non-array"); result = 0; @@ -35353,7 +35333,7 @@ num_index_prop: } else { zval_dtor(free_op2.var); } - } else if ((*container)->type == IS_STRING && !prop_dim) { /* string offsets */ + } else if (Z_TYPE_P(container) == IS_STRING && !prop_dim) { /* string offsets */ zval tmp; if (Z_TYPE_P(offset) != IS_LONG) { @@ -35371,11 +35351,11 @@ num_index_prop: } if (Z_TYPE_P(offset) == IS_LONG) { if (opline->extended_value & ZEND_ISSET) { - if (offset->value.lval >= 0 && offset->value.lval < Z_STRLEN_PP(container)) { + if (offset->value.lval >= 0 && offset->value.lval < Z_STRLEN_P(container)) { result = 1; } } else /* if (opline->extended_value & ZEND_ISEMPTY) */ { - if (offset->value.lval >= 0 && offset->value.lval < Z_STRLEN_PP(container) && Z_STRVAL_PP(container)[offset->value.lval] != '0') { + if (offset->value.lval >= 0 && offset->value.lval < Z_STRLEN_P(container) && Z_STRVAL_P(container)[offset->value.lval] != '0') { result = 1; } } @@ -37595,22 +37575,22 @@ static int ZEND_FASTCALL zend_isset_isempty_dim_prop_obj_handler_SPEC_CV_VAR(int { USE_OPLINE zend_free_op free_op2; - zval **container; + zval *container; zval **value = NULL; int result = 0; ulong hval; zval *offset; SAVE_OPLINE(); - container = _get_zval_ptr_ptr_cv_BP_VAR_IS(execute_data, opline->op1.var TSRMLS_CC); + container = _get_zval_ptr_cv_BP_VAR_IS(execute_data, opline->op1.var TSRMLS_CC); offset = _get_zval_ptr_var(opline->op2.var, execute_data, &free_op2 TSRMLS_CC); - if (Z_TYPE_PP(container) == IS_ARRAY && !prop_dim) { + if (Z_TYPE_P(container) == IS_ARRAY && !prop_dim) { HashTable *ht; int isset = 0; - ht = Z_ARRVAL_PP(container); + ht = Z_ARRVAL_P(container); switch (Z_TYPE_P(offset)) { case IS_DOUBLE: @@ -37629,9 +37609,7 @@ num_index_prop: if (IS_VAR == IS_CONST) { hval = Z_HASH_P(offset); } else { - if (!prop_dim) { - ZEND_HANDLE_NUMERIC_EX(Z_STRVAL_P(offset), Z_STRLEN_P(offset)+1, hval, goto num_index_prop); - } + ZEND_HANDLE_NUMERIC_EX(Z_STRVAL_P(offset), Z_STRLEN_P(offset)+1, hval, goto num_index_prop); if (IS_INTERNED(Z_STRVAL_P(offset))) { hval = INTERNED_HASH(Z_STRVAL_P(offset)); } else { @@ -37666,20 +37644,20 @@ num_index_prop: } } if (free_op2.var) {zval_ptr_dtor(&free_op2.var);}; - } else if (Z_TYPE_PP(container) == IS_OBJECT) { + } else if (Z_TYPE_P(container) == IS_OBJECT) { if (0) { MAKE_REAL_ZVAL_PTR(offset); } if (prop_dim) { - if (Z_OBJ_HT_P(*container)->has_property) { - result = Z_OBJ_HT_P(*container)->has_property(*container, offset, (opline->extended_value & ZEND_ISEMPTY) != 0, ((IS_VAR == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC); + if (Z_OBJ_HT_P(container)->has_property) { + result = Z_OBJ_HT_P(container)->has_property(container, offset, (opline->extended_value & ZEND_ISEMPTY) != 0, ((IS_VAR == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC); } else { zend_error(E_NOTICE, "Trying to check property of non-object"); result = 0; } } else { - if (Z_OBJ_HT_P(*container)->has_dimension) { - result = Z_OBJ_HT_P(*container)->has_dimension(*container, offset, (opline->extended_value & ZEND_ISEMPTY) != 0 TSRMLS_CC); + if (Z_OBJ_HT_P(container)->has_dimension) { + result = Z_OBJ_HT_P(container)->has_dimension(container, offset, (opline->extended_value & ZEND_ISEMPTY) != 0 TSRMLS_CC); } else { zend_error(E_NOTICE, "Trying to check element of non-array"); result = 0; @@ -37690,7 +37668,7 @@ num_index_prop: } else { if (free_op2.var) {zval_ptr_dtor(&free_op2.var);}; } - } else if ((*container)->type == IS_STRING && !prop_dim) { /* string offsets */ + } else if (Z_TYPE_P(container) == IS_STRING && !prop_dim) { /* string offsets */ zval tmp; if (Z_TYPE_P(offset) != IS_LONG) { @@ -37708,11 +37686,11 @@ num_index_prop: } if (Z_TYPE_P(offset) == IS_LONG) { if (opline->extended_value & ZEND_ISSET) { - if (offset->value.lval >= 0 && offset->value.lval < Z_STRLEN_PP(container)) { + if (offset->value.lval >= 0 && offset->value.lval < Z_STRLEN_P(container)) { result = 1; } } else /* if (opline->extended_value & ZEND_ISEMPTY) */ { - if (offset->value.lval >= 0 && offset->value.lval < Z_STRLEN_PP(container) && Z_STRVAL_PP(container)[offset->value.lval] != '0') { + if (offset->value.lval >= 0 && offset->value.lval < Z_STRLEN_P(container) && Z_STRVAL_P(container)[offset->value.lval] != '0') { result = 1; } } @@ -40600,22 +40578,22 @@ static int ZEND_FASTCALL zend_isset_isempty_dim_prop_obj_handler_SPEC_CV_CV(int { USE_OPLINE - zval **container; + zval *container; zval **value = NULL; int result = 0; ulong hval; zval *offset; SAVE_OPLINE(); - container = _get_zval_ptr_ptr_cv_BP_VAR_IS(execute_data, opline->op1.var TSRMLS_CC); + container = _get_zval_ptr_cv_BP_VAR_IS(execute_data, opline->op1.var TSRMLS_CC); offset = _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op2.var TSRMLS_CC); - if (Z_TYPE_PP(container) == IS_ARRAY && !prop_dim) { + if (Z_TYPE_P(container) == IS_ARRAY && !prop_dim) { HashTable *ht; int isset = 0; - ht = Z_ARRVAL_PP(container); + ht = Z_ARRVAL_P(container); switch (Z_TYPE_P(offset)) { case IS_DOUBLE: @@ -40634,9 +40612,7 @@ num_index_prop: if (IS_CV == IS_CONST) { hval = Z_HASH_P(offset); } else { - if (!prop_dim) { - ZEND_HANDLE_NUMERIC_EX(Z_STRVAL_P(offset), Z_STRLEN_P(offset)+1, hval, goto num_index_prop); - } + ZEND_HANDLE_NUMERIC_EX(Z_STRVAL_P(offset), Z_STRLEN_P(offset)+1, hval, goto num_index_prop); if (IS_INTERNED(Z_STRVAL_P(offset))) { hval = INTERNED_HASH(Z_STRVAL_P(offset)); } else { @@ -40671,20 +40647,20 @@ num_index_prop: } } - } else if (Z_TYPE_PP(container) == IS_OBJECT) { + } else if (Z_TYPE_P(container) == IS_OBJECT) { if (0) { MAKE_REAL_ZVAL_PTR(offset); } if (prop_dim) { - if (Z_OBJ_HT_P(*container)->has_property) { - result = Z_OBJ_HT_P(*container)->has_property(*container, offset, (opline->extended_value & ZEND_ISEMPTY) != 0, ((IS_CV == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC); + if (Z_OBJ_HT_P(container)->has_property) { + result = Z_OBJ_HT_P(container)->has_property(container, offset, (opline->extended_value & ZEND_ISEMPTY) != 0, ((IS_CV == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC); } else { zend_error(E_NOTICE, "Trying to check property of non-object"); result = 0; } } else { - if (Z_OBJ_HT_P(*container)->has_dimension) { - result = Z_OBJ_HT_P(*container)->has_dimension(*container, offset, (opline->extended_value & ZEND_ISEMPTY) != 0 TSRMLS_CC); + if (Z_OBJ_HT_P(container)->has_dimension) { + result = Z_OBJ_HT_P(container)->has_dimension(container, offset, (opline->extended_value & ZEND_ISEMPTY) != 0 TSRMLS_CC); } else { zend_error(E_NOTICE, "Trying to check element of non-array"); result = 0; @@ -40695,7 +40671,7 @@ num_index_prop: } else { } - } else if ((*container)->type == IS_STRING && !prop_dim) { /* string offsets */ + } else if (Z_TYPE_P(container) == IS_STRING && !prop_dim) { /* string offsets */ zval tmp; if (Z_TYPE_P(offset) != IS_LONG) { @@ -40713,11 +40689,11 @@ num_index_prop: } if (Z_TYPE_P(offset) == IS_LONG) { if (opline->extended_value & ZEND_ISSET) { - if (offset->value.lval >= 0 && offset->value.lval < Z_STRLEN_PP(container)) { + if (offset->value.lval >= 0 && offset->value.lval < Z_STRLEN_P(container)) { result = 1; } } else /* if (opline->extended_value & ZEND_ISEMPTY) */ { - if (offset->value.lval >= 0 && offset->value.lval < Z_STRLEN_PP(container) && Z_STRVAL_PP(container)[offset->value.lval] != '0') { + if (offset->value.lval >= 0 && offset->value.lval < Z_STRLEN_P(container) && Z_STRVAL_P(container)[offset->value.lval] != '0') { result = 1; } } diff --git a/ext/odbc/php_odbc_includes.h b/ext/odbc/php_odbc_includes.h index ca237c0537..c00583b16a 100644 --- a/ext/odbc/php_odbc_includes.h +++ b/ext/odbc/php_odbc_includes.h @@ -232,7 +232,7 @@ typedef struct odbc_connection { } odbc_connection; typedef struct odbc_result_value { - char name[32]; + char name[256]; char *value; SQLLEN vallen; SQLLEN coltype; diff --git a/ext/opcache/README b/ext/opcache/README index 46521587fa..2e30d92c00 100644 --- a/ext/opcache/README +++ b/ext/opcache/README @@ -80,8 +80,8 @@ opcache.max_accelerated_files (default "2000") The maximum number of keys (scripts) in the OPcache hash table. The number is actually the first one in the following set of prime numbers that is bigger than the one supplied: { 223, 463, 983, 1979, 3907, - 7963, 16229, 32531, 65407, 130987 }. Only numbers between 200 and 100000 - are allowed. + 7963, 16229, 32531, 65407, 130987, 262237, 524521, 1048793 }. Only numbers + between 200 and 1000000 are allowed. opcache.max_wasted_percentage (default "5") The maximum percentage of "wasted" memory until a restart is scheduled. diff --git a/ext/opcache/zend_accelerator_module.c b/ext/opcache/zend_accelerator_module.c index dedb7215c1..0914fb68dd 100644 --- a/ext/opcache/zend_accelerator_module.c +++ b/ext/opcache/zend_accelerator_module.c @@ -34,7 +34,7 @@ #define STRING_NOT_NULL(s) (NULL == (s)?"":s) #define MIN_ACCEL_FILES 200 -#define MAX_ACCEL_FILES 100000 +#define MAX_ACCEL_FILES 1000000 #define TOKENTOSTR(X) #X static void (*orig_file_exists)(INTERNAL_FUNCTION_PARAMETERS) = NULL; diff --git a/ext/standard/array.c b/ext/standard/array.c index 51972033ee..360a691d38 100644 --- a/ext/standard/array.c +++ b/ext/standard/array.c @@ -2222,13 +2222,14 @@ PHPAPI int php_array_merge(HashTable *dest, HashTable *src, int recursive TSRMLS case HASH_KEY_IS_STRING: if (recursive && zend_hash_find(dest, string_key, string_key_len, (void **)&dest_entry) == SUCCESS) { HashTable *thash = Z_TYPE_PP(dest_entry) == IS_ARRAY ? Z_ARRVAL_PP(dest_entry) : NULL; + zval *src_zval; + zval *tmp = NULL; if ((thash && thash->nApplyCount > 1) || (*src_entry == *dest_entry && Z_ISREF_PP(dest_entry) && (Z_REFCOUNT_PP(dest_entry) % 2))) { php_error_docref(NULL TSRMLS_CC, E_WARNING, "recursion detected"); return 0; } SEPARATE_ZVAL(dest_entry); - SEPARATE_ZVAL(src_entry); if (Z_TYPE_PP(dest_entry) == IS_NULL) { convert_to_array_ex(dest_entry); @@ -2236,23 +2237,34 @@ PHPAPI int php_array_merge(HashTable *dest, HashTable *src, int recursive TSRMLS } else { convert_to_array_ex(dest_entry); } - if (Z_TYPE_PP(src_entry) == IS_NULL) { - convert_to_array_ex(src_entry); - add_next_index_null(*src_entry); + if (Z_TYPE_PP(src_entry) == IS_OBJECT) { + ALLOC_ZVAL(src_zval); + INIT_PZVAL_COPY(src_zval, *src_entry); + zval_copy_ctor(src_zval); + convert_to_array(src_zval); + tmp = src_zval; } else { - convert_to_array_ex(src_entry); + src_zval = *src_entry; } - if (thash) { - thash->nApplyCount++; - } - if (!php_array_merge(Z_ARRVAL_PP(dest_entry), Z_ARRVAL_PP(src_entry), recursive TSRMLS_CC)) { + if (Z_TYPE_P(src_zval) == IS_ARRAY) { + if (thash) { + thash->nApplyCount++; + } + if (!php_array_merge(Z_ARRVAL_PP(dest_entry), Z_ARRVAL_P(src_zval), recursive TSRMLS_CC)) { + if (thash) { + thash->nApplyCount--; + } + return 0; + } if (thash) { thash->nApplyCount--; } - return 0; + } else { + Z_ADDREF_PP(src_entry); + zend_hash_next_index_insert(Z_ARRVAL_PP(dest_entry), &src_zval, sizeof(zval *), NULL); } - if (thash) { - thash->nApplyCount--; + if (tmp) { + zval_ptr_dtor(&tmp); } } else { Z_ADDREF_PP(src_entry); @@ -2356,7 +2368,6 @@ static void php_array_merge_or_replace_wrapper(INTERNAL_FUNCTION_PARAMETERS, int array_init_size(return_value, init_size); for (i = 0; i < argc; i++) { - SEPARATE_ZVAL(args[i]); if (!replace) { php_array_merge(Z_ARRVAL_P(return_value), Z_ARRVAL_PP(args[i]), recursive TSRMLS_CC); } else if (recursive && i > 0) { /* First array will be copied directly instead */ diff --git a/sapi/fpm/fpm/fpm_sockets.h b/sapi/fpm/fpm/fpm_sockets.h index cce5712b8c..121c016a7b 100644 --- a/sapi/fpm/fpm/fpm_sockets.h +++ b/sapi/fpm/fpm/fpm_sockets.h @@ -19,7 +19,7 @@ #if (__FreeBSD__) || (__OpenBSD__) #define FPM_BACKLOG_DEFAULT -1 #else -#define FPM_BACKLOG_DEFAULT 128 +#define FPM_BACKLOG_DEFAULT 65535 #endif enum fpm_address_domain fpm_sockets_domain_from_address(char *addr); diff --git a/sapi/fpm/php-fpm.conf.in b/sapi/fpm/php-fpm.conf.in index af4f2fa325..9002a2933b 100644 --- a/sapi/fpm/php-fpm.conf.in +++ b/sapi/fpm/php-fpm.conf.in @@ -159,8 +159,8 @@ group = @php_fpm_group@ listen = 127.0.0.1:9000 ; Set listen(2) backlog. -; Default Value: 128 (-1 on FreeBSD and OpenBSD) -;listen.backlog = 128 +; Default Value: 65535 (-1 on FreeBSD and OpenBSD) +;listen.backlog = 65535 ; Set permissions for unix socket, if one is used. In Linux, read/write ; permissions must be set in order to allow connections from a web server. Many |