Annotation of embedaddon/php/ext/simplexml/tests/034.phpt, revision 1.1
1.1 ! misho 1: --TEST--
! 2: SimpleXML: array casting bug
! 3: --XFAIL--
! 4: Does anyone know why?
! 5: --SKIPIF--
! 6: <?php if (!extension_loaded("simplexml")) print "skip"; ?>
! 7: --FILE--
! 8: <?php
! 9: $string = '<?xml version="1.0"?>
! 10: <foo><bar>
! 11: <p>Blah 1</p>
! 12: <p>Blah 2</p>
! 13: <p>Blah 3</p>
! 14: <tt>Blah 4</tt>
! 15: </bar></foo>
! 16: ';
! 17: $foo = simplexml_load_string($string);
! 18: $p = $foo->bar->p;
! 19: echo count($p);
! 20: $p = (array)$foo->bar->p;
! 21: echo count($p);
! 22: ?>
! 23: --EXPECTF--
! 24: 33
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>