3v4l.org

run code in 300+ PHP versions simultaneously
<?php $result = '<?xml version="1.0" encoding="UTF-8"?> <PrintLetterBarcodeData uid="123" name="Demo Name" gender="M" yob="2000" gname="Abdul Mannan" lm="city" vtc="City2" po="norway" dist="california" subdist="Ny" state="US" pc="12345" dob="22/06/2000"/>'; $array=json_decode(json_encode(simplexml_load_string($result)),true); foreach($array['@attributes'] as $k=>$v){ echo "<div>$k : $v</div>\n"; }
Output for git.master, git.master_jit, rfc.property-hooks
<div>uid : 123</div> <div>name : Demo Name</div> <div>gender : M</div> <div>yob : 2000</div> <div>gname : Abdul Mannan</div> <div>lm : city</div> <div>vtc : City2</div> <div>po : norway</div> <div>dist : california</div> <div>subdist : Ny</div> <div>state : US</div> <div>pc : 12345</div> <div>dob : 22/06/2000</div>

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:
134.73 ms | 406 KiB | 5 Q