3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $json = '{ "1":{"Itemname":"dtfg","unitprice":"12","Qty":"4","price":"$48.00"}, "2":{"Itemname":"kjh","unitprice":"45","Qty":"7","price":"$315.00"}, "3":{"Itemname":"yjk","unitprice":"76","Qty":"8","price":"$608.00"}, "4":{"Itemname":"hgj","unitprice":"4","Qty":"45","price":"$180.00"} }'; $myFullArray = json_decode($json); var_dump($myFullArray);
Output for 7.0.0 - 7.2.0
object(stdClass)#2 (4) { ["1"]=> object(stdClass)#1 (4) { ["Itemname"]=> string(4) "dtfg" ["unitprice"]=> string(2) "12" ["Qty"]=> string(1) "4" ["price"]=> string(6) "$48.00" } ["2"]=> object(stdClass)#3 (4) { ["Itemname"]=> string(3) "kjh" ["unitprice"]=> string(2) "45" ["Qty"]=> string(1) "7" ["price"]=> string(7) "$315.00" } ["3"]=> object(stdClass)#4 (4) { ["Itemname"]=> string(3) "yjk" ["unitprice"]=> string(2) "76" ["Qty"]=> string(1) "8" ["price"]=> string(7) "$608.00" } ["4"]=> object(stdClass)#5 (4) { ["Itemname"]=> string(3) "hgj" ["unitprice"]=> string(1) "4" ["Qty"]=> string(2) "45" ["price"]=> string(7) "$180.00" } }
Output for 5.3.22 - 5.6.28
object(stdClass)#1 (4) { ["1"]=> object(stdClass)#2 (4) { ["Itemname"]=> string(4) "dtfg" ["unitprice"]=> string(2) "12" ["Qty"]=> string(1) "4" ["price"]=> string(6) "$48.00" } ["2"]=> object(stdClass)#3 (4) { ["Itemname"]=> string(3) "kjh" ["unitprice"]=> string(2) "45" ["Qty"]=> string(1) "7" ["price"]=> string(7) "$315.00" } ["3"]=> object(stdClass)#4 (4) { ["Itemname"]=> string(3) "yjk" ["unitprice"]=> string(2) "76" ["Qty"]=> string(1) "8" ["price"]=> string(7) "$608.00" } ["4"]=> object(stdClass)#5 (4) { ["Itemname"]=> string(3) "hgj" ["unitprice"]=> string(1) "4" ["Qty"]=> string(2) "45" ["price"]=> string(7) "$180.00" } }