Skip to content

Commit ba35b22

Browse files
committed
Merge remote-tracking branch 'origin/master' into native-tls
* origin/master: (35 commits) Fixed bug #68398 msooxml matches too many archives Fix zpp call in apache_getenv() Drop unnecessary zval containers fixed test C89 compat add include for missing localeconv_r proto updated NEWS Fixed bug #65230 setting locale randomly broken Fix compilation error (ref #68424) Removed useless handlers Move checks for references into slow paths of operator functions. Remove duplicate opcode handlers. Revert unintentional docblock change Restored zip/oci8 PHP 4 code, add PHP 7 checks Note macro removal in UPGRADING.INTERNALS Removed ZEND_ENGINE_2 checks (and ZE1 code, it's been a decade!) Zend Engine 3 Updated NEWS Updated NEWS Updated NEWS Start adding new attribute to control multi statements ...
2 parents 88bb9fe + aa52fcf commit ba35b22

43 files changed

Lines changed: 31372 additions & 32470 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

NEWS

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,10 @@ PHP NEWS
4848
. Fixed bug #60509 (pcntl_signal doesn't decrease ref-count of old handler
4949
when setting SIG_DFL). (Julien)
5050

51+
- PDO_mysql:
52+
. Fixed bug #68424 (Add new PDO mysql connection attr to control multi
53+
statements option). (peter dot wolanin at acquia dot com)
54+
5155
- Reflection
5256
. Fixed inheritance chain of Reflector interface (Tjerk)
5357

@@ -63,6 +67,7 @@ PHP NEWS
6367
nor curruption state). (Julien)
6468
. Fixed bug #66405 (RecursiveDirectoryIterator::CURRENT_AS_PATHNAME
6569
breaks the RecursiveIterator). (Paul Garvin)
70+
. Fixed bug #68479 (Added escape parameter to SplFileObject::fputcsv). (Salathe)
6671

6772
- Standard:
6873
. Removed call_user_method() and call_user_method_array() functions. (Kalle)

UPGRADING.INTERNALS

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ PHP 7.0 INTERNALS UPGRADE NOTES
1212
k. get_class_entry object handler info
1313
l. get_class_name object handler info
1414
m. Other portable macros info
15+
n. ZEND_ENGINE_2 removal
1516

1617
2. Build system changes
1718
a. Unix build system changes
@@ -121,6 +122,8 @@ PHP 7.0 INTERNALS UPGRADE NOTES
121122
ZEND_FASTCALL is defined to use __vectorcall convention on VS2013 and above
122123
ZEND_NORETURN is defined as __declspec(noreturn) on VS
123124

125+
n. The ZEND_ENGINE_2 macro has been removed. A ZEND_ENGINE_3 macro has been added.
126+
124127
========================
125128
2. Build system changes
126129
========================

Zend/zend.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@
2222
#ifndef ZEND_H
2323
#define ZEND_H
2424

25-
#define ZEND_VERSION "2.8.0-dev"
25+
#define ZEND_VERSION "3.0.0-dev"
2626

27-
#define ZEND_ENGINE_2
27+
#define ZEND_ENGINE_3
2828

2929
#define ZEND_MAX_RESERVED_RESOURCES 4
3030

Zend/zend_execute.c

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1014,6 +1014,7 @@ static zend_always_inline zval *zend_fetch_dimension_address_inner(HashTable *ht
10141014
zend_string *offset_key;
10151015
zend_ulong hval;
10161016

1017+
try_again:
10171018
if (EXPECTED(Z_TYPE_P(dim) == IS_LONG)) {
10181019
hval = Z_LVAL_P(dim);
10191020
num_index:
@@ -1101,6 +1102,9 @@ static zend_always_inline zval *zend_fetch_dimension_address_inner(HashTable *ht
11011102
case IS_TRUE:
11021103
hval = 1;
11031104
goto num_index;
1105+
case IS_REFERENCE:
1106+
dim = Z_REFVAL_P(dim);
1107+
goto try_again;
11041108
default:
11051109
zend_error(E_WARNING, "Illegal offset type");
11061110
retval = (type == BP_VAR_W || type == BP_VAR_RW) ?
@@ -1118,6 +1122,7 @@ static zend_never_inline zend_long zend_check_string_offset(zval *container, zva
11181122
zend_error_noreturn(E_ERROR, "[] operator not supported for strings");
11191123
}
11201124

1125+
try_again:
11211126
if (UNEXPECTED(Z_TYPE_P(dim) != IS_LONG)) {
11221127
switch(Z_TYPE_P(dim)) {
11231128
case IS_STRING:
@@ -1134,6 +1139,9 @@ static zend_never_inline zend_long zend_check_string_offset(zval *container, zva
11341139
case IS_TRUE:
11351140
zend_error(E_NOTICE, "String offset cast occurred");
11361141
break;
1142+
case IS_REFERENCE:
1143+
dim = Z_REFVAL_P(dim);
1144+
goto try_again;
11371145
default:
11381146
zend_error(E_WARNING, "Illegal offset type");
11391147
break;
@@ -1269,13 +1277,13 @@ static zend_always_inline void zend_fetch_dimension_address_read(zval *result, z
12691277
{
12701278
zval *retval;
12711279

1272-
ZVAL_DEREF(container);
12731280
if (EXPECTED(Z_TYPE_P(container) == IS_ARRAY)) {
12741281
retval = zend_fetch_dimension_address_inner(Z_ARRVAL_P(container), dim, dim_type, type TSRMLS_CC);
12751282
ZVAL_COPY(result, retval);
12761283
} else if (EXPECTED(Z_TYPE_P(container) == IS_STRING)) {
12771284
zend_long offset;
12781285

1286+
try_again:
12791287
if (UNEXPECTED(Z_TYPE_P(dim) != IS_LONG)) {
12801288
switch(Z_TYPE_P(dim)) {
12811289
/* case IS_LONG: */
@@ -1295,6 +1303,9 @@ static zend_always_inline void zend_fetch_dimension_address_read(zval *result, z
12951303
zend_error(E_NOTICE, "String offset cast occurred");
12961304
}
12971305
break;
1306+
case IS_REFERENCE:
1307+
dim = Z_REFVAL_P(dim);
1308+
goto try_again;
12981309
default:
12991310
zend_error(E_WARNING, "Illegal offset type");
13001311
break;

Zend/zend_extensions.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,10 @@
2525
#include "zend_compile.h"
2626
#include "zend_build.h"
2727

28-
/* The first number is the engine version and the rest is the date.
28+
/* The first number is the engine version and the rest is the date (YYYYMMDD).
2929
* This way engine 2/3 API no. is always greater than engine 1 API no..
3030
*/
31-
#define ZEND_EXTENSION_API_NO 220140815
31+
#define ZEND_EXTENSION_API_NO 320140815
3232

3333
typedef struct _zend_extension_version_info {
3434
int zend_extension_api_no;

0 commit comments

Comments
 (0)