/hphp/test/zend/good/ext/xml/tests/xml_parse_into_struct_variation.php
PHP | 23 lines | 15 code | 3 blank | 5 comment | 0 complexity | 9bb93f0ef421c976f9272d0ca3702e06 MD5 | raw file
Possible License(s): LGPL-2.1, BSD-2-Clause, BSD-3-Clause, MPL-2.0-no-copyleft-exception, MIT, LGPL-2.0, Apache-2.0
- <?hh
- /* Prototype : proto int xml_parse_into_struct(resource parser, string data, inout array struct, inout array index)
- * Description: Parsing a XML document
- * Source code: ext/xml/xml.c
- * Alias to functions:
- */
- <<__EntryPoint>> function main(): void {
- echo "*** Testing xml_parse_into_struct() : variation ***\n";
- $simple = "<main><para><note>simple note</note></para><para><note>simple note</note></para></main>";
- $p = xml_parser_create();
- $vals = varray[];
- $index = varray[];
- xml_parse_into_struct($p, $simple, inout $vals, inout $index);
- xml_parser_free($p);
- echo "Index array\n";
- print_r($index);
- echo "\nVals array\n";
- print_r($vals);
- echo "Done";
- }