php-src/ext/simplexml/tests/034.phpt
Christoph M. Becker c42a7f2f3f Remove ignored --FAIL-- section from test case
This is just confusing.
2016-09-09 16:27:50 +02:00

22 lines
383 B
PHP

--TEST--
SimpleXML: cast to array
--SKIPIF--
<?php if (!extension_loaded("simplexml")) print "skip"; ?>
--FILE--
<?php
$string = '<?xml version="1.0"?>
<foo><bar>
<p>Blah 1</p>
<p>Blah 2</p>
<p>Blah 3</p>
<tt>Blah 4</tt>
</bar></foo>
';
$foo = simplexml_load_string($string);
$p = $foo->bar->p;
echo count($p);
$p = (array)$foo->bar->p;
echo count($p);
?>
--EXPECTF--
33