xref: /PHP-5.5/ext/simplexml/tests/034.phpt (revision 610c7fbe)
1--TEST--
2SimpleXML: cast to array
3--FAIL--
4Length of cast array does not match expected length
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;
19echo count($p);
20$p = (array)$foo->bar->p;
21echo count($p);
22?>
23--EXPECTF--
2433
25