File tree Expand file tree Collapse file tree 5 files changed +12
-20
lines changed
Expand file tree Collapse file tree 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");
77--FILE--
88<?php
99echo "Test \n" ;
10- var_dump (count ( exif_read_data (__DIR__ ."/bug62523_1.jpg " ) ));
10+ var_dump (exif_read_data (__DIR__ ."/bug62523_1.jpg " ));
1111?>
1212Done
1313--EXPECTF--
1414Test
1515
1616Warning: exif_read_data(bug62523_1.jpg): File not supported in %sbug62523_1.php on line %d
17- int(1 )
17+ bool(false )
1818Done
Original file line number Diff line number Diff line change @@ -7,12 +7,12 @@ extension_loaded("exif") or die("skip need exif");
77--FILE--
88<?php
99echo "Test \n" ;
10- var_dump (count ( exif_read_data (__DIR__ ."/bug62523_3.jpg " ) ));
10+ var_dump (exif_read_data (__DIR__ ."/bug62523_3.jpg " ));
1111?>
1212Done
1313--EXPECTF--
1414Test
1515
1616Warning: exif_read_data(bug62523_3.jpg): File not supported in %sbug62523_3.php on line %d
17- int(1 )
17+ bool(false )
1818Done
Original file line number Diff line number Diff line change 88variables_order=E
99--FILE--
1010<?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 ' ));
1313?>
1414--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)
1313 echo "=== $ what \n" ;
1414 eval ("var_dump(isset( \$$ what)); " );
1515 eval ("var_dump((bool) \$$ what); " );
16- eval ("var_dump(count( \$$ what)); " );
16+ eval ("if (isset( \$ $ what )) var_dump(count( \$$ what)); " );
1717 eval ("var_dump( \$$ what); " );
1818}
1919
@@ -168,7 +168,6 @@ object(SimpleXMLElement)#%d (2) {
168168===sxe->elem1[0]->elem2->bla
169169bool(false)
170170bool(false)
171- int(0)
172171object(SimpleXMLElement)#%d (0) {
173172}
174173===sxe->elem1[0]["attr1"]
@@ -182,7 +181,6 @@ object(SimpleXMLElement)#%d (1) {
182181===sxe->elem1[0]->attr1
183182bool(false)
184183bool(false)
185- int(0)
186184object(SimpleXMLElement)#%d (0) {
187185}
188186===sxe->elem1[1]
@@ -201,7 +199,6 @@ object(SimpleXMLElement)#%d (1) {
201199===sxe->elem1[2]
202200bool(false)
203201bool(false)
204- int(0)
205202NULL
206203===sxe->elem11
207204bool(true)
@@ -233,22 +230,18 @@ object(SimpleXMLElement)#%d (0) {
233230===sxe->elem22
234231bool(false)
235232bool(false)
236- int(0)
237233object(SimpleXMLElement)#%d (0) {
238234}
239235===sxe->elem22->elem222
240236bool(false)
241237bool(false)
242- int(0)
243238NULL
244239===sxe->elem22->attr22
245240bool(false)
246241bool(false)
247- int(0)
248242NULL
249243===sxe->elem22["attr22"]
250244bool(false)
251245bool(false)
252- int(0)
253246NULL
254247===DONE===
Original file line number Diff line number Diff line change @@ -9,9 +9,8 @@ $xml = simplexml_load_string("<root></root>");
99$ xml ->bla ->posts ->name = "FooBar " ;
1010echo $ xml ->asXML ();
1111$ 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 " ;
1514echo $ xml ->asXML ();
1615$ xml = simplexml_load_string ("<root></root> " );
1716$ xml ->bla ->posts []->name = "FooBar " ;
@@ -22,7 +21,7 @@ echo $xml->asXML();
2221--EXPECTF--
2322<? xml version="1.0 "?>
2423<root><bla><posts><name>FooBar</name></posts></bla></root>
25- int(0 )
24+ bool(false )
2625<? xml version="1.0 "?>
2726<root><bla><posts><name>FooBar</name></posts></bla></root>
2827<? xml version="1.0 "?>
You can’t perform that action at this time.
0 commit comments