3v4l.org

run code in 300+ PHP versions simultaneously
<?php $xmlString= '<?xml version="1.0" encoding="UTF-8" ?> <DATA> <playList> <timeStamp>201505261220</timeStamp> <picPlayList> <PlayMode>Sequential</PlayMode> <File>1.jpg</File> <File>10.jpg</File> <File>11.jpg</File> <File>12.jpg</File> <File>13.jpg</File> <File>14.jpg</File> </picPlayList> <videoPlayList> <video> <PlayMode>Sequential</PlayMode> <Screen>FIRST</Screen> <Type>Normal</Type> <File>9423dgg012.mp4</File> <File>letoutong15.mp4</File> <File>fengjing1.mp4</File> <File>fengjing2.mp4</File> <File>fengjing3.mp4</File> </video> <video> <PlayMode>Random</PlayMode> <Screen>SECOND</Screen> <Type>Normal</Type> <File>9423dgg012.mp4</File> <File>letoutong15.mp4</File> <File>fengjing1.mp4</File> <File>fengjing2.mp4</File> <File>fengjing3.mp4</File> </video> </videoPlayList> <HtmlViewList> <PlayMode>Sequential</PlayMode> <Screen>SECOND</Screen> <Type>Normal</Type> <URL>www.lotto-pass.cn/xxx/xxx/xxx</URL> <URL>www.lotto-pass.cn/xxx/xxx/xxx</URL> <URL>www.lotto-pass.cn/xxx/xxx/xxx</URL> <URL>www.lotto-pass.cn/xxx/xxx/xxx</URL> <Refresh>15</Refresh> </HtmlViewList> </playList> </DATA> '; $result_array = $xml_array = json_decode(json_encode(simplexml_load_string($xmlString)), true); echo "\nOutput:\n"; print_r($result_array); echo "\nThe Json output\n"; echo json_encode($result_array); ?>
Output for git.master, git.master_jit, rfc.property-hooks
Output: Array ( [playList] => Array ( [timeStamp] => 201505261220 [picPlayList] => Array ( [PlayMode] => Sequential [File] => Array ( [0] => 1.jpg [1] => 10.jpg [2] => 11.jpg [3] => 12.jpg [4] => 13.jpg [5] => 14.jpg ) ) [videoPlayList] => Array ( [video] => Array ( [0] => Array ( [PlayMode] => Sequential [Screen] => FIRST [Type] => Normal [File] => Array ( [0] => 9423dgg012.mp4 [1] => letoutong15.mp4 [2] => fengjing1.mp4 [3] => fengjing2.mp4 [4] => fengjing3.mp4 ) ) [1] => Array ( [PlayMode] => Random [Screen] => SECOND [Type] => Normal [File] => Array ( [0] => 9423dgg012.mp4 [1] => letoutong15.mp4 [2] => fengjing1.mp4 [3] => fengjing2.mp4 [4] => fengjing3.mp4 ) ) ) ) [HtmlViewList] => Array ( [PlayMode] => Sequential [Screen] => SECOND [Type] => Normal [URL] => Array ( [0] => www.lotto-pass.cn/xxx/xxx/xxx [1] => www.lotto-pass.cn/xxx/xxx/xxx [2] => www.lotto-pass.cn/xxx/xxx/xxx [3] => www.lotto-pass.cn/xxx/xxx/xxx ) [Refresh] => 15 ) ) ) The Json output {"playList":{"timeStamp":"201505261220","picPlayList":{"PlayMode":"Sequential","File":["1.jpg","10.jpg","11.jpg","12.jpg","13.jpg","14.jpg"]},"videoPlayList":{"video":[{"PlayMode":"Sequential","Screen":"FIRST","Type":"Normal","File":["9423dgg012.mp4","letoutong15.mp4","fengjing1.mp4","fengjing2.mp4","fengjing3.mp4"]},{"PlayMode":"Random","Screen":"SECOND","Type":"Normal","File":["9423dgg012.mp4","letoutong15.mp4","fengjing1.mp4","fengjing2.mp4","fengjing3.mp4"]}]},"HtmlViewList":{"PlayMode":"Sequential","Screen":"SECOND","Type":"Normal","URL":["www.lotto-pass.cn\/xxx\/xxx\/xxx","www.lotto-pass.cn\/xxx\/xxx\/xxx","www.lotto-pass.cn\/xxx\/xxx\/xxx","www.lotto-pass.cn\/xxx\/xxx\/xxx"],"Refresh":"15"}}}

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:
28.02 ms | 417 KiB | 5 Q