|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2006-01-30 15:19 UTC] tony2001@php.net
[2006-01-30 15:31 UTC] urs dot huerlimann at abf dot ch
[2006-01-30 15:34 UTC] urs dot huerlimann at abf dot ch
[2006-01-30 15:39 UTC] urs dot huerlimann at abf dot ch
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Dec 03 13:00:02 2025 UTC |
Description: ------------ count of an xml-object returns different result in 5.1.2 and 5.0.4: is there any bugfix in 5.1.2 that causes this behavior? [5.0.4] the structure looks like: object(SimpleXMLElement)#15 (6) { ["SaveMode"]=> string(6) "Insert" ["ManCd"]=> string(3) "BAG" ["RegNr"]=> string(47) "5_0x2E460x2E46_90_0x2E460x2E46_07_0x2E460x2E46_" ["DosNr"]=> string(16) "_0x2D450x2D45_43" ["Verantw"]=> string(6) "BAG070" ["Titel"]=> string(124) "105228 _0x7C1240x7C124_ WERT_CASNR _0x7C1240x7C124_ WERT_ECNR _0x7C1240x7C124_ WERT_REGISTERNR _0x7C1240x7C124_ WERT_BEZNAME" } ===================================================== [5.1.2] similar structure looks like object(SimpleXMLElement)#18 (6) { ["SaveMode"]=> string(6) "Insert" ["ManCd"]=> string(3) "BAG" ["RegNr"]=> string(47) "5_0x2E460x2E46_90_0x2E460x2E46_33_0x2E460x2E46_" ["DosNr"]=> string(15) "_0x2D450x2D45_1" ["Verantw"]=> string(6) "BAG070" ["Titel"]=> string(146) "3694 _0x7C1240x7C124_ 115_0x2D450x2D45_09_0x2D450x2D45_3 _0x7C1240x7C124_ 204_0x2D450x2D45_064_0x2D450x2D45_2 _0x7C1240x7C124_ chloromethylmercury" } Reproduce code: --------------- SimpleXMLElement has six entries. $a = new array(); $a[]=$SimpleXMLElement; (...) foreach($a as $detail) { echo(count($detail)); } Expected result: ---------------- twice the same result Actual result: -------------- 5.0.4::count -> 1 5.1.2::count -> 6