3v4l.org

run code in 300+ PHP versions simultaneously
<?php $market_hash_name = 'AK-47 | Aquamarine Revenge (Battle-Scarred)'; $json = '{ "status" : "success", "prices" : [ { "market_hash_name" : "AK-47 | Aquamarine Revenge (Battle-Scarred)", "price" : "15", "created_at" : 1460708937 }, { "market_hash_name" : "AK-47 | Aquamarine Revenge (Factory New)", "price" : "41.4", "created_at" : 1460708934 } ] }'; $arr = json_decode($json, true); foreach($arr['prices'] as $key => $val){ if($val['market_hash_name'] == $market_hash_name){ echo $val['price']; } }
Output for git.master, git.master_jit, rfc.property-hooks
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:
43.05 ms | 2081 KiB | 4 Q