3v4l.org

run code in 300+ PHP versions simultaneously
<?php error_reporting(E_ALL ^ E_NOTICE); $input = '<?xml version="1.0" ?><data><action>insert_message</action><reactid>00000000000000000000000000000000</reactid><topicid>126628</topicid><content><![CDATA[Test <a href="Wa">Meukee</a> Hoedel!]]></content><fields><mobile>iphone</mobile></fields></data>'; $xml_parser = xml_parser_create(''); xml_parser_set_option($xml_parser, XML_OPTION_CASE_FOLDING, 0); xml_parse_into_struct($xml_parser, $input, $vals); $inData = false; foreach($vals as $element) { if(strtolower($element['tag']) == 'data') { $inData = !$inData; } elseif($inData) { $data[ $element['tag'] ] = $element['value']; } } var_dump($data);
Output for git.master, git.master_jit, rfc.property-hooks
Warning: Undefined array key "value" in /in/LRtbY on line 24 Warning: Undefined array key "value" in /in/LRtbY on line 24 array(6) { ["action"]=> string(14) "insert_message" ["reactid"]=> string(32) "00000000000000000000000000000000" ["topicid"]=> string(6) "126628" ["content"]=> string(39) "Test <a href="Wa">Meukee</a> Hoedel!" ["fields"]=> NULL ["mobile"]=> string(6) "iphone" }

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:
36.7 ms | 402 KiB | 8 Q