File tree 5 files changed +12
-20
lines changed
5 files changed +12
-20
lines changed Original file line number Diff line number Diff line change @@ -7,12 +7,12 @@ extension_loaded("exif") or die("skip need exif");
7
7
--FILE--
8
8
<?php
9
9
echo "Test \n" ;
10
- var_dump (count ( exif_read_data (__DIR__ ."/bug62523_1.jpg " ) ));
10
+ var_dump (exif_read_data (__DIR__ ."/bug62523_1.jpg " ));
11
11
?>
12
12
Done
13
13
--EXPECTF--
14
14
Test
15
15
16
16
Warning: exif_read_data(bug62523_1.jpg): File not supported in %sbug62523_1.php on line %d
17
- int(1 )
17
+ bool(false )
18
18
Done
Original file line number Diff line number Diff line change @@ -7,12 +7,12 @@ extension_loaded("exif") or die("skip need exif");
7
7
--FILE--
8
8
<?php
9
9
echo "Test \n" ;
10
- var_dump (count ( exif_read_data (__DIR__ ."/bug62523_3.jpg " ) ));
10
+ var_dump (exif_read_data (__DIR__ ."/bug62523_3.jpg " ));
11
11
?>
12
12
Done
13
13
--EXPECTF--
14
14
Test
15
15
16
16
Warning: exif_read_data(bug62523_3.jpg): File not supported in %sbug62523_3.php on line %d
17
- int(1 )
17
+ bool(false )
18
18
Done
Original file line number Diff line number Diff line change 8
8
variables_order=E
9
9
--FILE--
10
10
<?php
11
- var_dump (count ( $ _ENV ['PATH ' ]) > 0 );
12
- var_dump (count ( filter_input (INPUT_ENV , 'PATH ' )) > 0 );
11
+ var_dump ($ _ENV ['PATH ' ]);
12
+ var_dump (filter_input (INPUT_ENV , 'PATH ' ));
13
13
?>
14
14
--EXPECT--
15
- bool(true)
16
- bool(true)
15
+ string(1) "/"
16
+ string(1) "/"
Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ function test($what)
13
13
echo "=== $ what \n" ;
14
14
eval ("var_dump(isset( \$$ what)); " );
15
15
eval ("var_dump((bool) \$$ what); " );
16
- eval ("var_dump(count( \$$ what)); " );
16
+ eval ("if (isset( \$ $ what )) var_dump(count( \$$ what)); " );
17
17
eval ("var_dump( \$$ what); " );
18
18
}
19
19
@@ -168,7 +168,6 @@ object(SimpleXMLElement)#%d (2) {
168
168
===sxe->elem1[0]->elem2->bla
169
169
bool(false)
170
170
bool(false)
171
- int(0)
172
171
object(SimpleXMLElement)#%d (0) {
173
172
}
174
173
===sxe->elem1[0]["attr1"]
@@ -182,7 +181,6 @@ object(SimpleXMLElement)#%d (1) {
182
181
===sxe->elem1[0]->attr1
183
182
bool(false)
184
183
bool(false)
185
- int(0)
186
184
object(SimpleXMLElement)#%d (0) {
187
185
}
188
186
===sxe->elem1[1]
@@ -201,7 +199,6 @@ object(SimpleXMLElement)#%d (1) {
201
199
===sxe->elem1[2]
202
200
bool(false)
203
201
bool(false)
204
- int(0)
205
202
NULL
206
203
===sxe->elem11
207
204
bool(true)
@@ -233,22 +230,18 @@ object(SimpleXMLElement)#%d (0) {
233
230
===sxe->elem22
234
231
bool(false)
235
232
bool(false)
236
- int(0)
237
233
object(SimpleXMLElement)#%d (0) {
238
234
}
239
235
===sxe->elem22->elem222
240
236
bool(false)
241
237
bool(false)
242
- int(0)
243
238
NULL
244
239
===sxe->elem22->attr22
245
240
bool(false)
246
241
bool(false)
247
- int(0)
248
242
NULL
249
243
===sxe->elem22["attr22"]
250
244
bool(false)
251
245
bool(false)
252
- int(0)
253
246
NULL
254
247
===DONE===
Original file line number Diff line number Diff line change @@ -9,9 +9,8 @@ $xml = simplexml_load_string("<root></root>");
9
9
$ xml ->bla ->posts ->name = "FooBar " ;
10
10
echo $ xml ->asXML ();
11
11
$ xml = simplexml_load_string ("<root></root> " );
12
- $ count = count ($ xml ->bla ->posts );
13
- var_dump ($ count );
14
- $ xml ->bla ->posts [$ count ]->name = "FooBar " ;
12
+ var_dump (isset ($ xml ->bla ->posts ));
13
+ $ xml ->bla ->posts [0 ]->name = "FooBar " ;
15
14
echo $ xml ->asXML ();
16
15
$ xml = simplexml_load_string ("<root></root> " );
17
16
$ xml ->bla ->posts []->name = "FooBar " ;
@@ -22,7 +21,7 @@ echo $xml->asXML();
22
21
--EXPECTF--
23
22
<? xml version="1.0 "?>
24
23
<root><bla><posts><name>FooBar</name></posts></bla></root>
25
- int(0 )
24
+ bool(false )
26
25
<? xml version="1.0 "?>
27
26
<root><bla><posts><name>FooBar</name></posts></bla></root>
28
27
<? xml version="1.0 "?>
You can’t perform that action at this time.
0 commit comments