diff options
author | Nikita Popov <nikita.ppv@gmail.com> | 2019-07-10 11:11:30 +0200 |
---|---|---|
committer | Nikita Popov <nikita.ppv@gmail.com> | 2019-07-10 11:11:30 +0200 |
commit | bbd12b3d30f4ff6694d99d63033eb31b88946211 (patch) | |
tree | d0dc45126f321d809324fc361672e597a9a4422b /ext/simplexml | |
parent | b3438b2670fc699d37e1281ab31478f25d2d8786 (diff) | |
parent | 2bca35eaccfcded049f61f994c6c9078c6c91208 (diff) | |
download | php-git-bbd12b3d30f4ff6694d99d63033eb31b88946211.tar.gz |
Merge branch 'PHP-7.4'
Diffstat (limited to 'ext/simplexml')
-rw-r--r-- | ext/simplexml/tests/017.phpt | 21 |
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=== |