diff options
-rw-r--r-- | UPGRADING | 8 | ||||
-rw-r--r-- | Zend/zend_execute_API.c | 9 | ||||
-rw-r--r-- | Zend/zend_objects.c | 4 | ||||
-rw-r--r-- | Zend/zend_vm_def.h | 6 | ||||
-rw-r--r-- | Zend/zend_vm_execute.h | 6 | ||||
-rw-r--r-- | ext/standard/tests/array/array_fill_variation1.phpt | 2 | ||||
-rw-r--r-- | main/php_streams.h | 4 | ||||
-rw-r--r-- | sapi/apache2handler/php_apache.h | 6 | ||||
-rw-r--r-- | sapi/apache2handler/php_functions.c | 6 |
9 files changed, 21 insertions, 30 deletions
@@ -22,8 +22,6 @@ PHP X.Y UPGRADE NOTES ======================================== - Core - . Added null coalesce operator (??). - (RFC: https://wiki.php.net/rfc/isset_ternary) . list() now always supports ArrayAccess and never supports strings. Previously both were accepted in some situations and not in others. (RFC: https://wiki.php.net/rfc/fix_list_behavior_inconsistency) @@ -36,6 +34,7 @@ PHP X.Y UPGRADE NOTES around. . Removed ASP (<%) and script (<script language=php>) tags. (RFC: https://wiki.php.net/rfc/remove_alternative_php_tags) + . call_user_method() and call_user_method_array() no longer exists. - DBA . dba_delete() now returns false if the key was not found for the inifile @@ -51,6 +50,8 @@ PHP X.Y UPGRADE NOTES ======================================== - Core + . Added null coalesce operator (??). + (RFC: https://wiki.php.net/rfc/isset_ternary) . Support for strings with length >= 2^31 bytes in 64 bit builds . Closure::call() method added @@ -137,6 +138,3 @@ PHP X.Y UPGRADE NOTES always be zero when casted to integer. . Calling a method on a non-object no longer raises a fatal error; see also: https://wiki.php.net/rfc/catchable-call-to-member-of-non-object - -- Standard - . call_user_method() and call_user_method_array() no longer exists. diff --git a/Zend/zend_execute_API.c b/Zend/zend_execute_API.c index e212302fb7..cfdfaa6134 100644 --- a/Zend/zend_execute_API.c +++ b/Zend/zend_execute_API.c @@ -1466,17 +1466,14 @@ ZEND_API void zend_attach_symbol_table(zend_execute_data *execute_data) /* {{{ * if (zv) { if (Z_TYPE_P(zv) == IS_INDIRECT) { zval *val = Z_INDIRECT_P(zv); - if (Z_TYPE_P(val) == IS_UNDEF) { - ZVAL_UNDEF(EX_VAR_NUM(i)); - } else { - ZVAL_COPY_VALUE(EX_VAR_NUM(i), val); - } + + ZVAL_COPY_VALUE(EX_VAR_NUM(i), val); } else { ZVAL_COPY_VALUE(EX_VAR_NUM(i), zv); } } else { ZVAL_UNDEF(EX_VAR_NUM(i)); - zv = zend_hash_update(ht, op_array->vars[i], EX_VAR_NUM(i)); + zv = zend_hash_add_new(ht, op_array->vars[i], EX_VAR_NUM(i)); } ZVAL_INDIRECT(zv, EX_VAR_NUM(i)); } diff --git a/Zend/zend_objects.c b/Zend/zend_objects.c index c42354fe4e..76f923e977 100644 --- a/Zend/zend_objects.c +++ b/Zend/zend_objects.c @@ -167,9 +167,9 @@ ZEND_API void zend_objects_clone_members(zend_object *new_object, zend_object *o zval_add_ref(&new_prop); } if (key) { - zend_hash_update(new_object->properties, key, &new_prop); + zend_hash_add_new(new_object->properties, key, &new_prop); } else { - zend_hash_index_update(new_object->properties, num_key, &new_prop); + zend_hash_index_add_new(new_object->properties, num_key, &new_prop); } } ZEND_HASH_FOREACH_END(); } diff --git a/Zend/zend_vm_def.h b/Zend/zend_vm_def.h index 039020943a..1e0cda1ef6 100644 --- a/Zend/zend_vm_def.h +++ b/Zend/zend_vm_def.h @@ -2771,11 +2771,9 @@ ZEND_VM_HANDLER(60, ZEND_DO_FCALL, ANY, ANY) LOAD_OPLINE(); if (UNEXPECTED(fbc->type == ZEND_INTERNAL_FUNCTION)) { - int should_change_scope = 0; zval *ret; if (fbc->common.scope) { - should_change_scope = 1; /* TODO: we don't set scope if we call an object method ??? */ /* See: ext/pdo_sqlite/tests/pdo_fetch_func_001.phpt */ #if 1 @@ -2806,7 +2804,7 @@ ZEND_VM_HANDLER(60, ZEND_DO_FCALL, ANY, ANY) if (RETURN_VALUE_USED(opline)) { ZVAL_UNDEF(EX_VAR(opline->result.var)); } - if (UNEXPECTED(should_change_scope)) { + if (UNEXPECTED(fbc->common.scope)) { ZEND_VM_C_GOTO(fcall_end_change_scope); } else { ZEND_VM_C_GOTO(fcall_end); @@ -2832,7 +2830,7 @@ ZEND_VM_HANDLER(60, ZEND_DO_FCALL, ANY, ANY) zval_ptr_dtor(ret); } - if (UNEXPECTED(should_change_scope)) { + if (UNEXPECTED(fbc->common.scope)) { ZEND_VM_C_GOTO(fcall_end_change_scope); } else { ZEND_VM_C_GOTO(fcall_end); diff --git a/Zend/zend_vm_execute.h b/Zend/zend_vm_execute.h index 5b1d22edcc..d245738c4e 100644 --- a/Zend/zend_vm_execute.h +++ b/Zend/zend_vm_execute.h @@ -513,11 +513,9 @@ static int ZEND_FASTCALL ZEND_DO_FCALL_SPEC_HANDLER(ZEND_OPCODE_HANDLER_ARGS) LOAD_OPLINE(); if (UNEXPECTED(fbc->type == ZEND_INTERNAL_FUNCTION)) { - int should_change_scope = 0; zval *ret; if (fbc->common.scope) { - should_change_scope = 1; /* TODO: we don't set scope if we call an object method ??? */ /* See: ext/pdo_sqlite/tests/pdo_fetch_func_001.phpt */ #if 1 @@ -548,7 +546,7 @@ static int ZEND_FASTCALL ZEND_DO_FCALL_SPEC_HANDLER(ZEND_OPCODE_HANDLER_ARGS) if (RETURN_VALUE_USED(opline)) { ZVAL_UNDEF(EX_VAR(opline->result.var)); } - if (UNEXPECTED(should_change_scope)) { + if (UNEXPECTED(fbc->common.scope)) { goto fcall_end_change_scope; } else { goto fcall_end; @@ -574,7 +572,7 @@ static int ZEND_FASTCALL ZEND_DO_FCALL_SPEC_HANDLER(ZEND_OPCODE_HANDLER_ARGS) zval_ptr_dtor(ret); } - if (UNEXPECTED(should_change_scope)) { + if (UNEXPECTED(fbc->common.scope)) { goto fcall_end_change_scope; } else { goto fcall_end; diff --git a/ext/standard/tests/array/array_fill_variation1.phpt b/ext/standard/tests/array/array_fill_variation1.phpt index f36da7d0e6..0bedf4a68b 100644 --- a/ext/standard/tests/array/array_fill_variation1.phpt +++ b/ext/standard/tests/array/array_fill_variation1.phpt @@ -125,7 +125,7 @@ array(2) { } -- Iteration 3 -- -Warning: array_fill() expects parameter 1 to be long, double given in /Users/ajf/Projects/2014/PHP/php-src/ext/standard/tests/array/array_fill_variation1.php on line 92 +Warning: array_fill() expects parameter 1 to be long, double given in %s/ext/standard/tests/array/array_fill_variation1.php on line 92 NULL -- Iteration 4 -- array(2) { diff --git a/main/php_streams.h b/main/php_streams.h index c0f16b6126..29abb3ebd5 100644 --- a/main/php_streams.h +++ b/main/php_streams.h @@ -210,6 +210,8 @@ struct _php_stream { zend_resource *ctx; int flags; /* PHP_STREAM_FLAG_XXX */ + int eof; + /* buffer */ zend_off_t position; /* of underlying stream */ unsigned char *readbuf; @@ -220,8 +222,6 @@ struct _php_stream { /* how much data to read when filling buffer */ size_t chunk_size; - int eof; - #if ZEND_DEBUG const char *open_filename; uint open_lineno; diff --git a/sapi/apache2handler/php_apache.h b/sapi/apache2handler/php_apache.h index da20072b14..8712b2b958 100644 --- a/sapi/apache2handler/php_apache.h +++ b/sapi/apache2handler/php_apache.h @@ -70,9 +70,9 @@ void php_ap2_register_hook(apr_pool_t *p); #define APR_ARRAY_FOREACH_CLOSE() }} typedef struct { - long engine; - long xbithack; - long last_modified; + zend_bool engine; + zend_bool xbithack; + zend_bool last_modified; } php_apache2_info_struct; extern zend_module_entry apache2_module_entry; diff --git a/sapi/apache2handler/php_functions.c b/sapi/apache2handler/php_functions.c index 5225090c13..2eb6a64c00 100644 --- a/sapi/apache2handler/php_functions.c +++ b/sapi/apache2handler/php_functions.c @@ -532,9 +532,9 @@ static const zend_function_entry apache_functions[] = { }; PHP_INI_BEGIN() - STD_PHP_INI_ENTRY("xbithack", "0", PHP_INI_ALL, OnUpdateLong, xbithack, php_apache2_info_struct, php_apache2_info) - STD_PHP_INI_ENTRY("engine", "1", PHP_INI_ALL, OnUpdateLong, engine, php_apache2_info_struct, php_apache2_info) - STD_PHP_INI_ENTRY("last_modified", "0", PHP_INI_ALL, OnUpdateLong, last_modified, php_apache2_info_struct, php_apache2_info) + STD_PHP_INI_ENTRY("xbithack", "0", PHP_INI_ALL, OnUpdateBool, xbithack, php_apache2_info_struct, php_apache2_info) + STD_PHP_INI_ENTRY("engine", "1", PHP_INI_ALL, OnUpdateBool, engine, php_apache2_info_struct, php_apache2_info) + STD_PHP_INI_ENTRY("last_modified", "0", PHP_INI_ALL, OnUpdateBool, last_modified, php_apache2_info_struct, php_apache2_info) PHP_INI_END() static PHP_MINIT_FUNCTION(apache) |