3v4l.org

run code in 300+ PHP versions simultaneously
<?php $json = '{"id":35,"po_code":"PMS201635","purchase_orders":"a:2:{i:0;a:7:{s:2:\\"id\\";s:1:\\"9\\";s:3:\\"qty\\";s:1:\\"2\\";s:4:\\"unit\\";s:7:\\"Capsule\\";s:6:\\"pharma\\";s:12:\\"Ibuprofen IB\\";s:9:\\"packaging\\";s:7:\\"50 caps\\";s:5:\\"price\\";s:2:\\"23\\";s:5:\\"total\\";s:2:\\"46\\";}i:1;a:7:{s:2:\\"id\\";s:2:\\"11\\";s:3:\\"qty\\";s:1:\\"5\\";s:4:\\"unit\\";s:6:\\"Pieces\\";s:6:\\"pharma\\";s:12:\\"Ecotrin oral\\";s:9:\\"packaging\\";s:6:\\"100pcs\\";s:5:\\"price\\";s:2:\\"13\\";s:5:\\"total\\";s:2:\\"65\\";}}","freight_charge":"0","overall_total":"111","created_at":"2016-05-21 16:50:49","updated_at":"2016-05-21 16:50:49","shipped_via":"Select","terms":""}'; $result = json_decode ($json); $arr = unserialize ($result->purchase_orders); foreach($arr as $val){ echo '<pre>'; print_r($val); }
Output for git.master, git.master_jit, rfc.property-hooks
<pre>Array ( [id] => 9 [qty] => 2 [unit] => Capsule [pharma] => Ibuprofen IB [packaging] => 50 caps [price] => 23 [total] => 46 ) <pre>Array ( [id] => 11 [qty] => 5 [unit] => Pieces [pharma] => Ecotrin oral [packaging] => 100pcs [price] => 13 [total] => 65 )

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:
58.44 ms | 402 KiB | 8 Q