3v4l.org

run code in 500+ PHP versions simultaneously
<?php $xml_string = '<?xml version="1.0" encoding="utf-8"?> <Order DeliveryNo="PH00127495JP"> <Status> <State StateDate="2016-06-28 11:37:47" StateMessage="亲,您的包裹已入库完成,祝您海淘愉快!" StateOperator="PH002JP" /> <State StateDate="2016-06-29 12:32:13" StateMessage="亲,您的包裹已安排极速转运!" StateOperator="PH002JP" /> <State StateDate="2016-07-02 09:16:58" StateMessage="亲,您的包裹已到达HK分拨中心,等待清关中!" StateOperator="PH005CN" /> <State StateDate="2016-07-04 09:32:16" StateMessage="亲,您的包裹已清关完毕!" StateOperator="PH006CN" /> </Status> </Order>'; libxml_disable_entity_loader(true); $obj = simplexml_load_string($xml_string, 'SimpleXMLElement', LIBXML_NOCDATA); print_r($obj); echo $obj->attributes()->DeliveryNo;
Output for git.master, git.master_jit, rfc.property-hooks
Deprecated: Function libxml_disable_entity_loader() is deprecated in /in/JZ3UP on line 11 SimpleXMLElement Object ( [@attributes] => Array ( [DeliveryNo] => PH00127495JP ) [Status] => SimpleXMLElement Object ( [State] => Array ( [0] => SimpleXMLElement Object ( [@attributes] => Array ( [StateDate] => 2016-06-28 11:37:47 [StateMessage] => 亲,您的包裹已入库完成,祝您海淘愉快! [StateOperator] => PH002JP ) ) [1] => SimpleXMLElement Object ( [@attributes] => Array ( [StateDate] => 2016-06-29 12:32:13 [StateMessage] => 亲,您的包裹已安排极速转运! [StateOperator] => PH002JP ) ) [2] => SimpleXMLElement Object ( [@attributes] => Array ( [StateDate] => 2016-07-02 09:16:58 [StateMessage] => 亲,您的包裹已到达HK分拨中心,等待清关中! [StateOperator] => PH005CN ) ) [3] => SimpleXMLElement Object ( [@attributes] => Array ( [StateDate] => 2016-07-04 09:32:16 [StateMessage] => 亲,您的包裹已清关完毕! [StateOperator] => PH006CN ) ) ) ) ) PH00127495JP

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:
48.13 ms | 2324 KiB | 4 Q