3v4l.org

run code in 300+ PHP versions simultaneously
<?php $xml = <<<XML <?xml version="1.0" encoding="ISO-8859-1"?> <BroadcastMonitor> <updated>2016-02-22T17:05:45</updated> <stationName>SLAM Muziek</stationName> <startTime>2016-02-22T17:05:45</startTime> <titleName>Lovers Friends</titleName> <artistName>MÖWE &amp; Daniel Nitt</artistName> </BroadcastMonitor> XML; $p = xml_parser_create(); xml_parse_into_struct($p, $xml, $results, $index); xml_parser_free($p); var_dump($index); var_dump($results); var_dump($results[$index["ARTISTNAME"][0]]['value']); $string = "MÖWE"; var_dump($string); var_dump(utf8_encode($string));
Output for git.master, git.master_jit, rfc.property-hooks
array(6) { ["BROADCASTMONITOR"]=> array(7) { [0]=> int(0) [1]=> int(2) [2]=> int(4) [3]=> int(6) [4]=> int(8) [5]=> int(10) [6]=> int(11) } ["UPDATED"]=> array(1) { [0]=> int(1) } ["STATIONNAME"]=> array(1) { [0]=> int(3) } ["STARTTIME"]=> array(1) { [0]=> int(5) } ["TITLENAME"]=> array(1) { [0]=> int(7) } ["ARTISTNAME"]=> array(1) { [0]=> int(9) } } array(12) { [0]=> array(4) { ["tag"]=> string(16) "BROADCASTMONITOR" ["type"]=> string(4) "open" ["level"]=> int(1) ["value"]=> string(3) " " } [1]=> array(4) { ["tag"]=> string(7) "UPDATED" ["type"]=> string(8) "complete" ["level"]=> int(2) ["value"]=> string(19) "2016-02-22T17:05:45" } [2]=> array(4) { ["tag"]=> string(16) "BROADCASTMONITOR" ["value"]=> string(3) " " ["type"]=> string(5) "cdata" ["level"]=> int(1) } [3]=> array(4) { ["tag"]=> string(11) "STATIONNAME" ["type"]=> string(8) "complete" ["level"]=> int(2) ["value"]=> string(11) "SLAM Muziek" } [4]=> array(4) { ["tag"]=> string(16) "BROADCASTMONITOR" ["value"]=> string(5) " " ["type"]=> string(5) "cdata" ["level"]=> int(1) } [5]=> array(4) { ["tag"]=> string(9) "STARTTIME" ["type"]=> string(8) "complete" ["level"]=> int(2) ["value"]=> string(19) "2016-02-22T17:05:45" } [6]=> array(4) { ["tag"]=> string(16) "BROADCASTMONITOR" ["value"]=> string(5) " " ["type"]=> string(5) "cdata" ["level"]=> int(1) } [7]=> array(4) { ["tag"]=> string(9) "TITLENAME" ["type"]=> string(8) "complete" ["level"]=> int(2) ["value"]=> string(14) "Lovers Friends" } [8]=> array(4) { ["tag"]=> string(16) "BROADCASTMONITOR" ["value"]=> string(5) " " ["type"]=> string(5) "cdata" ["level"]=> int(1) } [9]=> array(4) { ["tag"]=> string(10) "ARTISTNAME" ["type"]=> string(8) "complete" ["level"]=> int(2) ["value"]=> string(21) "MÖWE & Daniel Nitt" } [10]=> array(4) { ["tag"]=> string(16) "BROADCASTMONITOR" ["value"]=> string(1) " " ["type"]=> string(5) "cdata" ["level"]=> int(1) } [11]=> array(3) { ["tag"]=> string(16) "BROADCASTMONITOR" ["type"]=> string(5) "close" ["level"]=> int(1) } } string(21) "MÖWE & Daniel Nitt" string(5) "MÖWE" Deprecated: Function utf8_encode() is deprecated in /in/DIHc5 on line 24 string(7) "MÖWE"

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:
170.71 ms | 416 KiB | 5 Q