summaryrefslogtreecommitdiff
path: root/ext/simplexml
diff options
context:
space:
mode:
authorNikita Popov <nikita.ppv@gmail.com>2019-07-10 11:11:30 +0200
committerNikita Popov <nikita.ppv@gmail.com>2019-07-10 11:11:30 +0200
commitbbd12b3d30f4ff6694d99d63033eb31b88946211 (patch)
treed0dc45126f321d809324fc361672e597a9a4422b /ext/simplexml
parentb3438b2670fc699d37e1281ab31478f25d2d8786 (diff)
parent2bca35eaccfcded049f61f994c6c9078c6c91208 (diff)
downloadphp-git-bbd12b3d30f4ff6694d99d63033eb31b88946211.tar.gz
Merge branch 'PHP-7.4'
Diffstat (limited to 'ext/simplexml')
-rw-r--r--ext/simplexml/tests/017.phpt21
1 files changed, 6 insertions, 15 deletions
diff --git a/ext/simplexml/tests/017.phpt b/ext/simplexml/tests/017.phpt
index ba42ac46a9..42d6e3eccc 100644
--- a/ext/simplexml/tests/017.phpt
+++ b/ext/simplexml/tests/017.phpt
@@ -34,12 +34,11 @@ function print_xml($xml) {
}
function print_xml2($xml) {
- $persons = 2;
- for ($i=0;$i<$persons;$i++) {
- echo "person: ".$xml->person[$i]['name']."\n";
- $children = 2;
- for ($j=0;$j<$children;$j++) {
- echo " child: ".$xml->person[$i]->child[$j]['name']."\n";
+ for ($i=0;$i<count($xml->person);$i++) {
+ $person = $xml->person[$i];
+ echo "person: ".$person['name']."\n";
+ for ($j=0;$j<count($person->child);$j++) {
+ echo " child: ".$person->child[$j]['name']."\n";
}
}
}
@@ -54,7 +53,7 @@ echo "---22---\n";
print_xml2(simplexml_load_string($xml1));
?>
===DONE===
---EXPECTF--
+--EXPECT--
---11---
person: Joe
child: Ann
@@ -75,12 +74,4 @@ person: Boe
---22---
person: Joe
child: Ann
- child:
-person:
-
-Notice: Trying to get property 'child' of non-object in %s017.php on line %d
- child:
-
-Notice: Trying to get property 'child' of non-object in %s017.php on line %d
- child:
===DONE===