Skip to content

Commit f5e9d3f

Browse files
committed
Fix
1 parent 21a5cb6 commit f5e9d3f

File tree

1 file changed

+62
-62
lines changed

1 file changed

+62
-62
lines changed

Zend/tests/type_declarations/union_types/type_checking_weak.phpt

Lines changed: 62 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -66,63 +66,63 @@ Type int|float:
6666
INF => INF
6767
"42" => 42
6868
"42.0" => 42.0
69-
"42x" => {%s(%d) : eval()'d code:1}(): Argument #1 ($arg) must be of type int|float, string given
70-
"x" => {%s(%d) : eval()'d code:1}(): Argument #1 ($arg) must be of type int|float, string given
71-
"" => {%s(%d) : eval()'d code:1}(): Argument #1 ($arg) must be of type int|float, string given
72-
true => 1 ({%s(%d) : eval()'d code:1}(): Passing bool to parameter #1 ($arg) of type int|float is deprecated)
73-
false => 0 ({%s(%d) : eval()'d code:1}(): Passing bool to parameter #1 ($arg) of type int|float is deprecated)
74-
null => {%s(%d) : eval()'d code:1}(): Argument #1 ($arg) must be of type int|float, null given
75-
[] => {%s(%d) : eval()'d code:1}(): Argument #1 ($arg) must be of type int|float, array given
76-
new stdClass => {%s(%d) : eval()'d code:1}(): Argument #1 ($arg) must be of type int|float, stdClass given
77-
new WithToString => {%s(%d) : eval()'d code:1}(): Argument #1 ($arg) must be of type int|float, WithToString given
69+
"42x" => {closure:%s:%d}(): Argument #1 ($arg) must be of type int|float, string given
70+
"x" => {closure:%s:%d}(): Argument #1 ($arg) must be of type int|float, string given
71+
"" => {closure:%s:%d}(): Argument #1 ($arg) must be of type int|float, string given
72+
true => 1 ({closure:%s:%d}(): Passing bool to parameter #1 ($arg) of type int|float is deprecated)
73+
false => 0 ({closure:%s:%d}(): Passing bool to parameter #1 ($arg) of type int|float is deprecated)
74+
null => {closure:%s:%d}(): Argument #1 ($arg) must be of type int|float, null given
75+
[] => {closure:%s:%d}(): Argument #1 ($arg) must be of type int|float, array given
76+
new stdClass => {closure:%s:%d}(): Argument #1 ($arg) must be of type int|float, stdClass given
77+
new WithToString => {closure:%s:%d}(): Argument #1 ($arg) must be of type int|float, WithToString given
7878

7979
Type int|float|false:
8080
42 => 42
8181
42.0 => 42.0
8282
INF => INF
8383
"42" => 42
8484
"42.0" => 42.0
85-
"42x" => {%s(%d) : eval()'d code:1}(): Argument #1 ($arg) must be of type int|float|false, string given
86-
"x" => {%s(%d) : eval()'d code:1}(): Argument #1 ($arg) must be of type int|float|false, string given
87-
"" => {%s(%d) : eval()'d code:1}(): Argument #1 ($arg) must be of type int|float|false, string given
88-
true => 1 ({%s(%d) : eval()'d code:1}(): Passing bool to parameter #1 ($arg) of type int|float|false is deprecated)
85+
"42x" => {closure:%s:%d}(): Argument #1 ($arg) must be of type int|float|false, string given
86+
"x" => {closure:%s:%d}(): Argument #1 ($arg) must be of type int|float|false, string given
87+
"" => {closure:%s:%d}(): Argument #1 ($arg) must be of type int|float|false, string given
88+
true => 1 ({closure:%s:%d}(): Passing bool to parameter #1 ($arg) of type int|float|false is deprecated)
8989
false => false
90-
null => {%s(%d) : eval()'d code:1}(): Argument #1 ($arg) must be of type int|float|false, null given
91-
[] => {%s(%d) : eval()'d code:1}(): Argument #1 ($arg) must be of type int|float|false, array given
92-
new stdClass => {%s(%d) : eval()'d code:1}(): Argument #1 ($arg) must be of type int|float|false, stdClass given
93-
new WithToString => {%s(%d) : eval()'d code:1}(): Argument #1 ($arg) must be of type int|float|false, WithToString given
90+
null => {closure:%s:%d}(): Argument #1 ($arg) must be of type int|float|false, null given
91+
[] => {closure:%s:%d}(): Argument #1 ($arg) must be of type int|float|false, array given
92+
new stdClass => {closure:%s:%d}(): Argument #1 ($arg) must be of type int|float|false, stdClass given
93+
new WithToString => {closure:%s:%d}(): Argument #1 ($arg) must be of type int|float|false, WithToString given
9494

9595
Type int|float|bool:
9696
42 => 42
9797
42.0 => 42.0
9898
INF => INF
9999
"42" => 42
100100
"42.0" => 42.0
101-
"42x" => true ({%s(%d) : eval()'d code:1}(): Passing string to parameter #1 ($arg) of type int|float|bool is deprecated)
102-
"x" => true ({%s(%d) : eval()'d code:1}(): Passing string to parameter #1 ($arg) of type int|float|bool is deprecated)
103-
"" => false ({%s(%d) : eval()'d code:1}(): Passing string to parameter #1 ($arg) of type int|float|bool is deprecated)
101+
"42x" => true ({closure:%s:%d}(): Passing string to parameter #1 ($arg) of type int|float|bool is deprecated)
102+
"x" => true ({closure:%s:%d}(): Passing string to parameter #1 ($arg) of type int|float|bool is deprecated)
103+
"" => false ({closure:%s:%d}(): Passing string to parameter #1 ($arg) of type int|float|bool is deprecated)
104104
true => true
105105
false => false
106-
null => {%s(%d) : eval()'d code:1}(): Argument #1 ($arg) must be of type int|float|bool, null given
107-
[] => {%s(%d) : eval()'d code:1}(): Argument #1 ($arg) must be of type int|float|bool, array given
108-
new stdClass => {%s(%d) : eval()'d code:1}(): Argument #1 ($arg) must be of type int|float|bool, stdClass given
109-
new WithToString => {%s(%d) : eval()'d code:1}(): Argument #1 ($arg) must be of type int|float|bool, WithToString given
106+
null => {closure:%s:%d}(): Argument #1 ($arg) must be of type int|float|bool, null given
107+
[] => {closure:%s:%d}(): Argument #1 ($arg) must be of type int|float|bool, array given
108+
new stdClass => {closure:%s:%d}(): Argument #1 ($arg) must be of type int|float|bool, stdClass given
109+
new WithToString => {closure:%s:%d}(): Argument #1 ($arg) must be of type int|float|bool, WithToString given
110110

111111
Type int|bool:
112112
42 => 42
113113
42.0 => 42
114-
INF => true ({%s(%d) : eval()'d code:1}(): Passing float to parameter #1 ($arg) of type int|bool is deprecated)
114+
INF => true ({closure:%s:%d}(): Passing float to parameter #1 ($arg) of type int|bool is deprecated)
115115
"42" => 42
116116
"42.0" => 42
117-
"42x" => true ({%s(%d) : eval()'d code:1}(): Passing string to parameter #1 ($arg) of type int|bool is deprecated)
118-
"x" => true ({%s(%d) : eval()'d code:1}(): Passing string to parameter #1 ($arg) of type int|bool is deprecated)
119-
"" => false ({%s(%d) : eval()'d code:1}(): Passing string to parameter #1 ($arg) of type int|bool is deprecated)
117+
"42x" => true ({closure:%s:%d}(): Passing string to parameter #1 ($arg) of type int|bool is deprecated)
118+
"x" => true ({closure:%s:%d}(): Passing string to parameter #1 ($arg) of type int|bool is deprecated)
119+
"" => false ({closure:%s:%d}(): Passing string to parameter #1 ($arg) of type int|bool is deprecated)
120120
true => true
121121
false => false
122-
null => {%s(%d) : eval()'d code:1}(): Argument #1 ($arg) must be of type int|bool, null given
123-
[] => {%s(%d) : eval()'d code:1}(): Argument #1 ($arg) must be of type int|bool, array given
124-
new stdClass => {%s(%d) : eval()'d code:1}(): Argument #1 ($arg) must be of type int|bool, stdClass given
125-
new WithToString => {%s(%d) : eval()'d code:1}(): Argument #1 ($arg) must be of type int|bool, WithToString given
122+
null => {closure:%s:%d}(): Argument #1 ($arg) must be of type int|bool, null given
123+
[] => {closure:%s:%d}(): Argument #1 ($arg) must be of type int|bool, array given
124+
new stdClass => {closure:%s:%d}(): Argument #1 ($arg) must be of type int|bool, stdClass given
125+
new WithToString => {closure:%s:%d}(): Argument #1 ($arg) must be of type int|bool, WithToString given
126126

127127
Type int|string|null:
128128
42 => 42
@@ -133,11 +133,11 @@ INF => "INF"
133133
"42x" => "42x"
134134
"x" => "x"
135135
"" => ""
136-
true => 1 ({%s(%d) : eval()'d code:1}(): Passing bool to parameter #1 ($arg) of type string|int|null is deprecated)
137-
false => 0 ({%s(%d) : eval()'d code:1}(): Passing bool to parameter #1 ($arg) of type string|int|null is deprecated)
136+
true => 1 ({closure:%s:%d}(): Passing bool to parameter #1 ($arg) of type string|int|null is deprecated)
137+
false => 0 ({closure:%s:%d}(): Passing bool to parameter #1 ($arg) of type string|int|null is deprecated)
138138
null => null
139-
[] => {%s(%d) : eval()'d code:1}(): Argument #1 ($arg) must be of type string|int|null, array given
140-
new stdClass => {%s(%d) : eval()'d code:1}(): Argument #1 ($arg) must be of type string|int|null, stdClass given
139+
[] => {closure:%s:%d}(): Argument #1 ($arg) must be of type string|int|null, array given
140+
new stdClass => {closure:%s:%d}(): Argument #1 ($arg) must be of type string|int|null, stdClass given
141141
new WithToString => "__toString()"
142142

143143
Type string|bool:
@@ -151,9 +151,9 @@ INF => "INF"
151151
"" => ""
152152
true => true
153153
false => false
154-
null => {%s(%d) : eval()'d code:1}(): Argument #1 ($arg) must be of type string|bool, null given
155-
[] => {%s(%d) : eval()'d code:1}(): Argument #1 ($arg) must be of type string|bool, array given
156-
new stdClass => {%s(%d) : eval()'d code:1}(): Argument #1 ($arg) must be of type string|bool, stdClass given
154+
null => {closure:%s:%d}(): Argument #1 ($arg) must be of type string|bool, null given
155+
[] => {closure:%s:%d}(): Argument #1 ($arg) must be of type string|bool, array given
156+
new stdClass => {closure:%s:%d}(): Argument #1 ($arg) must be of type string|bool, stdClass given
157157
new WithToString => "__toString()"
158158

159159
Type float|array:
@@ -162,15 +162,15 @@ Type float|array:
162162
INF => INF
163163
"42" => 42.0
164164
"42.0" => 42.0
165-
"42x" => {%s(%d) : eval()'d code:1}(): Argument #1 ($arg) must be of type array|float, string given
166-
"x" => {%s(%d) : eval()'d code:1}(): Argument #1 ($arg) must be of type array|float, string given
167-
"" => {%s(%d) : eval()'d code:1}(): Argument #1 ($arg) must be of type array|float, string given
168-
true => 1.0 ({%s(%d) : eval()'d code:1}(): Passing bool to parameter #1 ($arg) of type array|float is deprecated)
169-
false => 0.0 ({%s(%d) : eval()'d code:1}(): Passing bool to parameter #1 ($arg) of type array|float is deprecated)
170-
null => {%s(%d) : eval()'d code:1}(): Argument #1 ($arg) must be of type array|float, null given
165+
"42x" => {closure:%s:%d}(): Argument #1 ($arg) must be of type array|float, string given
166+
"x" => {closure:%s:%d}(): Argument #1 ($arg) must be of type array|float, string given
167+
"" => {closure:%s:%d}(): Argument #1 ($arg) must be of type array|float, string given
168+
true => 1.0 ({closure:%s:%d}(): Passing bool to parameter #1 ($arg) of type array|float is deprecated)
169+
false => 0.0 ({closure:%s:%d}(): Passing bool to parameter #1 ($arg) of type array|float is deprecated)
170+
null => {closure:%s:%d}(): Argument #1 ($arg) must be of type array|float, null given
171171
[] => []
172-
new stdClass => {%s(%d) : eval()'d code:1}(): Argument #1 ($arg) must be of type array|float, stdClass given
173-
new WithToString => {%s(%d) : eval()'d code:1}(): Argument #1 ($arg) must be of type array|float, WithToString given
172+
new stdClass => {closure:%s:%d}(): Argument #1 ($arg) must be of type array|float, stdClass given
173+
new WithToString => {closure:%s:%d}(): Argument #1 ($arg) must be of type array|float, WithToString given
174174

175175
Type string|array:
176176
42 => "42"
@@ -181,25 +181,25 @@ INF => "INF"
181181
"42x" => "42x"
182182
"x" => "x"
183183
"" => ""
184-
true => "1" ({%s(%d) : eval()'d code:1}(): Passing bool to parameter #1 ($arg) of type array|string is deprecated)
185-
false => "" ({%s(%d) : eval()'d code:1}(): Passing bool to parameter #1 ($arg) of type array|string is deprecated)
186-
null => {%s(%d) : eval()'d code:1}(): Argument #1 ($arg) must be of type array|string, null given
184+
true => "1" ({closure:%s:%d}(): Passing bool to parameter #1 ($arg) of type array|string is deprecated)
185+
false => "" ({closure:%s:%d}(): Passing bool to parameter #1 ($arg) of type array|string is deprecated)
186+
null => {closure:%s:%d}(): Argument #1 ($arg) must be of type array|string, null given
187187
[] => []
188-
new stdClass => {%s(%d) : eval()'d code:1}(): Argument #1 ($arg) must be of type array|string, stdClass given
188+
new stdClass => {closure:%s:%d}(): Argument #1 ($arg) must be of type array|string, stdClass given
189189
new WithToString => "__toString()"
190190

191191
Type bool|array:
192-
42 => true ({%s(%d) : eval()'d code:1}(): Passing int to parameter #1 ($arg) of type array|bool is deprecated)
193-
42.0 => true ({%s(%d) : eval()'d code:1}(): Passing float to parameter #1 ($arg) of type array|bool is deprecated)
194-
INF => true ({%s(%d) : eval()'d code:1}(): Passing float to parameter #1 ($arg) of type array|bool is deprecated)
195-
"42" => true ({%s(%d) : eval()'d code:1}(): Passing string to parameter #1 ($arg) of type array|bool is deprecated)
196-
"42.0" => true ({%s(%d) : eval()'d code:1}(): Passing string to parameter #1 ($arg) of type array|bool is deprecated)
197-
"42x" => true ({%s(%d) : eval()'d code:1}(): Passing string to parameter #1 ($arg) of type array|bool is deprecated)
198-
"x" => true ({%s(%d) : eval()'d code:1}(): Passing string to parameter #1 ($arg) of type array|bool is deprecated)
199-
"" => false ({%s(%d) : eval()'d code:1}(): Passing string to parameter #1 ($arg) of type array|bool is deprecated)
192+
42 => true ({closure:%s:%d}(): Passing int to parameter #1 ($arg) of type array|bool is deprecated)
193+
42.0 => true ({closure:%s:%d}(): Passing float to parameter #1 ($arg) of type array|bool is deprecated)
194+
INF => true ({closure:%s:%d}(): Passing float to parameter #1 ($arg) of type array|bool is deprecated)
195+
"42" => true ({closure:%s:%d}(): Passing string to parameter #1 ($arg) of type array|bool is deprecated)
196+
"42.0" => true ({closure:%s:%d}(): Passing string to parameter #1 ($arg) of type array|bool is deprecated)
197+
"42x" => true ({closure:%s:%d}(): Passing string to parameter #1 ($arg) of type array|bool is deprecated)
198+
"x" => true ({closure:%s:%d}(): Passing string to parameter #1 ($arg) of type array|bool is deprecated)
199+
"" => false ({closure:%s:%d}(): Passing string to parameter #1 ($arg) of type array|bool is deprecated)
200200
true => true
201201
false => false
202-
null => {%s(%d) : eval()'d code:1}(): Argument #1 ($arg) must be of type array|bool, null given
202+
null => {closure:%s:%d}(): Argument #1 ($arg) must be of type array|bool, null given
203203
[] => []
204-
new stdClass => {%s(%d) : eval()'d code:1}(): Argument #1 ($arg) must be of type array|bool, stdClass given
205-
new WithToString => {%s(%d) : eval()'d code:1}(): Argument #1 ($arg) must be of type array|bool, WithToString given
204+
new stdClass => {closure:%s:%d}(): Argument #1 ($arg) must be of type array|bool, stdClass given
205+
new WithToString => {closure:%s:%d}(): Argument #1 ($arg) must be of type array|bool, WithToString given

0 commit comments

Comments
 (0)