Skip to content

Commit b4bd2b2

Browse files
committed
Fix tests
1 parent d67c388 commit b4bd2b2

File tree

9 files changed

+119
-107
lines changed

9 files changed

+119
-107
lines changed

Zend/tests/generators/generator_closure_collection.phpt

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ The Closure object of a generator is freed when the generator is freed.
44
<?php
55

66
$genFactory = function() {
7+
/* Avoid static inference and caching. */
8+
static $dummy;
79
yield 1;
810
yield 2;
911
yield 3;
@@ -25,23 +27,33 @@ var_dump($r->get());
2527

2628
?>
2729
--EXPECTF--
28-
object(Closure)#%d (3) {
30+
object(Closure)#%d (4) {
2931
["name"]=>
3032
string(%d) "{closure:%s:%d}"
3133
["file"]=>
3234
string(%d) "%s"
3335
["line"]=>
3436
int(%d)
37+
["static"]=>
38+
array(1) {
39+
["dummy"]=>
40+
NULL
41+
}
3542
}
3643
int(1)
3744
int(2)
3845
int(3)
39-
object(Closure)#%d (3) {
46+
object(Closure)#%d (4) {
4047
["name"]=>
4148
string(%d) "{closure:%s:%d}"
4249
["file"]=>
4350
string(%d) "%s"
4451
["line"]=>
4552
int(%d)
53+
["static"]=>
54+
array(1) {
55+
["dummy"]=>
56+
NULL
57+
}
4658
}
4759
NULL

Zend/zend_vm_def.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8348,7 +8348,7 @@ ZEND_VM_HANDLER(210, ZEND_DECLARE_ATTRIBUTED_CONST, CONST, CONST)
83488348
ZEND_VM_NEXT_OPCODE_EX(1, 2);
83498349
}
83508350

8351-
ZEND_VM_HANDLER(142, ZEND_DECLARE_LAMBDA_FUNCTION, CONST, NUM, NUM|CACHE_SLOT)
8351+
ZEND_VM_HANDLER(142, ZEND_DECLARE_LAMBDA_FUNCTION, UNUSED, NUM, NUM|CACHE_SLOT)
83528352
{
83538353
USE_OPLINE
83548354
zend_function *func;

Zend/zend_vm_execute.h

Lines changed: 88 additions & 88 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Zend/zend_vm_handlers.h

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Zend/zend_vm_opcodes.c

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

ext/opcache/tests/gh19867.phpt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,15 @@ $_main:
1515
; (lines=%d, args=0, vars=%d, tmps=%d)
1616
; (after optimizer)
1717
; %s
18-
0000 T0 = DECLARE_LAMBDA_FUNCTION 0
18+
0000 T0 = DECLARE_LAMBDA_FUNCTION %d 0
1919
0001 FREE T0
2020
0002 RETURN int(1)
2121

2222
{closure:%s:%d}:
2323
; (lines=%d, args=0, vars=%d, tmps=%d)
2424
; (after optimizer)
2525
; %s
26-
0000 T0 = DECLARE_LAMBDA_FUNCTION 0
26+
0000 T0 = DECLARE_LAMBDA_FUNCTION %d 0
2727
0001 RETURN T0
2828

2929
{closure:%s:%d}:

ext/reflection/tests/ReflectionFunction__toString_bound_variables.phpt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@ echo (string) $rf;
1919

2020
?>
2121
--EXPECTF--
22-
Closure [ <user> function {closure:%s:%d} ] {
22+
Closure [ <user> static function {closure:%s:%d} ] {
2323
@@ %sReflectionFunction__toString_bound_variables.php 3 - 3
2424
}
25-
Closure [ <user> function {closure:%s:%d} ] {
25+
Closure [ <user> static function {closure:%s:%d} ] {
2626
@@ %sReflectionFunction__toString_bound_variables.php 9 - 12
2727

2828
- Bound Variables [2] {

ext/spl/tests/ArrayObject/ArrayObject_sort_different_backing_storage.phpt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ object(ArrayObject)#2 (1) {
4141
}
4242

4343
Deprecated: ArrayObject::__construct(): Using an object as a backing array for ArrayObject is deprecated, as it allows violating class constraints and invariants in %s on line %d
44-
object(ArrayObject)#3 (1) {
44+
object(ArrayObject)#%d (1) {
4545
["storage":"ArrayObject":private]=>
4646
object(ArrayObject)#2 (1) {
4747
["storage":"ArrayObject":private]=>
@@ -59,18 +59,18 @@ Deprecated: ArrayObject::exchangeArray(): Using an object as a backing array for
5959
Deprecated: Creation of dynamic property ArrayObject::$a is deprecated in %s on line %d
6060

6161
Deprecated: Creation of dynamic property ArrayObject::$b is deprecated in %s on line %d
62-
object(ArrayObject)#4 (2) {
62+
object(ArrayObject)#%d (2) {
6363
["b"]=>
6464
int(1)
6565
["a"]=>
6666
int(2)
6767
}
68-
object(ArrayObject)#5 (1) {
68+
object(ArrayObject)#%d (1) {
6969
["storage":"ArrayObject":private]=>
7070
array(0) {
7171
}
7272
}
73-
object(ArrayObject)#6 (1) {
73+
object(ArrayObject)#%d (1) {
7474
["storage":"ArrayObject":private]=>
7575
array(2) {
7676
["b"]=>

0 commit comments

Comments
 (0)