Skip to content

Commit a07ae67

Browse files
committed
Merge branch 'PHP-5.5' of git.php.net:php-src into PHP-5.5
2 parents 3d4ef50 + 55ee543 commit a07ae67

21 files changed

+964
-919
lines changed

NEWS

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,28 @@ PHP NEWS
33
?? ??? 2013, PHP 5.5.6
44

55
- Core:
6+
. Improved performance of array_merge() and func_get_args() by eliminating
7+
useless copying. (Dmitry)
68
. Fixed bug #65939 (Space before ";" breaks php.ini parsing).
79
(brainstorm at nopcode dot org)
810
. Fixed bug #65911 (scope resolution operator - strange behavior with $this).
911
(Bob Weinand)
12+
. Fixed bug #65936 (dangling context pointer causes crash). (Tony)
13+
14+
- FPM:
15+
. Changed default listen() backlog to 65535. (Tony)
16+
17+
- OPcache
18+
. Increased limit for opcache.max_accelerated_files to 1,000,000. (Chris)
19+
20+
- ODBC
21+
. Fixed bug #65950 (Field name truncation if the field name is bigger than
22+
32 characters). (patch submitted by: michael dot y at zend dot com, Yasuo)
23+
24+
- Standard:
25+
. Fixed bug #64760 (var_export() does not use full precision for floating-point
26+
numbers) (Yasuo)
27+
1028

1129
17 Oct 2013, PHP 5.5.5
1230

@@ -16,7 +34,6 @@ PHP NEWS
1634
. Fixed bug #65322 (compile time errors won't trigger auto loading). (Nikita)
1735
. Fixed bug #65821 (By-ref foreach on property access of string offset
1836
segfaults). (Nikita)
19-
. Fixed bug #65936 (dangling context pointer causes crash). (Tony)
2037

2138
- CLI server:
2239
. Fixed bug #65633 (built-in server treat some http headers as

README.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ See https://wiki.php.net/rfc and https://wiki.php.net/rfc/voting for more
1717
information on the process.
1818

1919
Bug fixes **do not** require an RFC, but require a bugtracker ticket. Always
20-
open a ticket at http://bugs.php.net and reference the bug id using #NNNNNN.
20+
open a ticket at https://bugs.php.net and reference the bug id using #NNNNNN.
2121

2222
Fix #55371: get_magic_quotes_gpc() throws deprecation warning
2323

@@ -28,3 +28,12 @@ open a ticket at http://bugs.php.net and reference the bug id using #NNNNNN.
2828

2929
We do not merge pull requests directly on github. All PRs will be
3030
pulled and pushed through http://git.php.net.
31+
32+
33+
Guidelines for contributors
34+
===========================
35+
- [CODING_STANDARDS](/CODING_STANDARDS)
36+
- [README.GIT-RULES](/README.GIT-RULES)
37+
- [README.MAILINGLIST_RULES](/README.MAILINGLIST_RULES)
38+
- [README.RELEASE_PROCESS](/README.RELEASE_PROCESS)
39+

Zend/zend_builtin_functions.c

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -461,12 +461,17 @@ ZEND_FUNCTION(func_get_args)
461461

462462
array_init_size(return_value, arg_count);
463463
for (i=0; i<arg_count; i++) {
464-
zval *element;
464+
zval *element, *arg;
465465

466-
ALLOC_ZVAL(element);
467-
*element = **((zval **) (p-(arg_count-i)));
468-
zval_copy_ctor(element);
469-
INIT_PZVAL(element);
466+
arg = *((zval **) (p-(arg_count-i)));
467+
if (!Z_ISREF_P(arg)) {
468+
element = arg;
469+
Z_ADDREF_P(element);
470+
} else {
471+
ALLOC_ZVAL(element);
472+
INIT_PZVAL_COPY(element, arg);
473+
zval_copy_ctor(element);
474+
}
470475
zend_hash_next_index_insert(return_value->value.ht, &element, sizeof(zval *), NULL);
471476
}
472477
}

Zend/zend_vm_def.h

Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -4453,22 +4453,22 @@ ZEND_VM_HELPER_EX(zend_isset_isempty_dim_prop_obj_handler, VAR|UNUSED|CV, CONST|
44534453
{
44544454
USE_OPLINE
44554455
zend_free_op free_op1, free_op2;
4456-
zval **container;
4456+
zval *container;
44574457
zval **value = NULL;
44584458
int result = 0;
44594459
ulong hval;
44604460
zval *offset;
44614461

44624462
SAVE_OPLINE();
4463-
container = GET_OP1_OBJ_ZVAL_PTR_PTR(BP_VAR_IS);
4463+
container = GET_OP1_OBJ_ZVAL_PTR(BP_VAR_IS);
44644464

44654465
offset = GET_OP2_ZVAL_PTR(BP_VAR_R);
44664466

4467-
if (Z_TYPE_PP(container) == IS_ARRAY && !prop_dim) {
4467+
if (Z_TYPE_P(container) == IS_ARRAY && !prop_dim) {
44684468
HashTable *ht;
44694469
int isset = 0;
44704470

4471-
ht = Z_ARRVAL_PP(container);
4471+
ht = Z_ARRVAL_P(container);
44724472

44734473
switch (Z_TYPE_P(offset)) {
44744474
case IS_DOUBLE:
@@ -4487,9 +4487,7 @@ ZEND_VM_C_LABEL(num_index_prop):
44874487
if (OP2_TYPE == IS_CONST) {
44884488
hval = Z_HASH_P(offset);
44894489
} else {
4490-
if (!prop_dim) {
4491-
ZEND_HANDLE_NUMERIC_EX(Z_STRVAL_P(offset), Z_STRLEN_P(offset)+1, hval, ZEND_VM_C_GOTO(num_index_prop));
4492-
}
4490+
ZEND_HANDLE_NUMERIC_EX(Z_STRVAL_P(offset), Z_STRLEN_P(offset)+1, hval, ZEND_VM_C_GOTO(num_index_prop));
44934491
if (IS_INTERNED(Z_STRVAL_P(offset))) {
44944492
hval = INTERNED_HASH(Z_STRVAL_P(offset));
44954493
} else {
@@ -4524,20 +4522,20 @@ ZEND_VM_C_LABEL(num_index_prop):
45244522
}
45254523
}
45264524
FREE_OP2();
4527-
} else if (Z_TYPE_PP(container) == IS_OBJECT) {
4525+
} else if (Z_TYPE_P(container) == IS_OBJECT) {
45284526
if (IS_OP2_TMP_FREE()) {
45294527
MAKE_REAL_ZVAL_PTR(offset);
45304528
}
45314529
if (prop_dim) {
4532-
if (Z_OBJ_HT_P(*container)->has_property) {
4533-
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);
4530+
if (Z_OBJ_HT_P(container)->has_property) {
4531+
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);
45344532
} else {
45354533
zend_error(E_NOTICE, "Trying to check property of non-object");
45364534
result = 0;
45374535
}
45384536
} else {
4539-
if (Z_OBJ_HT_P(*container)->has_dimension) {
4540-
result = Z_OBJ_HT_P(*container)->has_dimension(*container, offset, (opline->extended_value & ZEND_ISEMPTY) != 0 TSRMLS_CC);
4537+
if (Z_OBJ_HT_P(container)->has_dimension) {
4538+
result = Z_OBJ_HT_P(container)->has_dimension(container, offset, (opline->extended_value & ZEND_ISEMPTY) != 0 TSRMLS_CC);
45414539
} else {
45424540
zend_error(E_NOTICE, "Trying to check element of non-array");
45434541
result = 0;
@@ -4548,7 +4546,7 @@ ZEND_VM_C_LABEL(num_index_prop):
45484546
} else {
45494547
FREE_OP2();
45504548
}
4551-
} else if ((*container)->type == IS_STRING && !prop_dim) { /* string offsets */
4549+
} else if (Z_TYPE_P(container) == IS_STRING && !prop_dim) { /* string offsets */
45524550
zval tmp;
45534551

45544552
if (Z_TYPE_P(offset) != IS_LONG) {
@@ -4566,11 +4564,11 @@ ZEND_VM_C_LABEL(num_index_prop):
45664564
}
45674565
if (Z_TYPE_P(offset) == IS_LONG) {
45684566
if (opline->extended_value & ZEND_ISSET) {
4569-
if (offset->value.lval >= 0 && offset->value.lval < Z_STRLEN_PP(container)) {
4567+
if (offset->value.lval >= 0 && offset->value.lval < Z_STRLEN_P(container)) {
45704568
result = 1;
45714569
}
45724570
} else /* if (opline->extended_value & ZEND_ISEMPTY) */ {
4573-
if (offset->value.lval >= 0 && offset->value.lval < Z_STRLEN_PP(container) && Z_STRVAL_PP(container)[offset->value.lval] != '0') {
4571+
if (offset->value.lval >= 0 && offset->value.lval < Z_STRLEN_P(container) && Z_STRVAL_P(container)[offset->value.lval] != '0') {
45744572
result = 1;
45754573
}
45764574
}

0 commit comments

Comments
 (0)