3v4l.org

run code in 300+ PHP versions simultaneously
<?php function parseAndOutput($s) { $p = xml_parser_create(); // xml_parser_set_option($p, XML_OPTION_SKIP_WHITE, 1); xml_parse_into_struct($p, $s, $values, $index); var_dump($values); // echo $values[0]['value'] . "\n\n"; } // $s = "<a>b\nc</a>"; // parseAndOutput($s); $s = "<a><b>&lt;d&gt;\n &lt;e&gt;</b><![CDATA[]]><c>\n \t</c></a>"; parseAndOutput($s);
Output for git.master, git.master_jit, rfc.property-hooks
array(5) { [0]=> array(3) { ["tag"]=> string(1) "A" ["type"]=> string(4) "open" ["level"]=> int(1) } [1]=> array(4) { ["tag"]=> string(1) "B" ["type"]=> string(8) "complete" ["level"]=> int(2) ["value"]=> string(8) "<d> <e>" } [2]=> array(4) { ["tag"]=> string(1) "A" ["value"]=> string(0) "" ["type"]=> string(5) "cdata" ["level"]=> int(1) } [3]=> array(4) { ["tag"]=> string(1) "C" ["type"]=> string(8) "complete" ["level"]=> int(2) ["value"]=> string(3) " " } [4]=> array(3) { ["tag"]=> string(1) "A" ["type"]=> string(5) "close" ["level"]=> int(1) } }

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
150.96 ms | 407 KiB | 5 Q