3v4l.org

run code in 300+ PHP versions simultaneously
<?php $shipmentDet = '{"{\"Coupon\": \"\", \"PromotionName\": \"FREE Tighty Wifey\", \"DiscountAmount\": 23.75}","{\"Coupon\": \"get20\", \"PromotionName\": \"GET20\", \"DiscountAmount\": 20}"}'; $newString = str_replace('","', '"},~;{"', $shipmentDet); $explore = explode(',~;', $newString); $decode = substr($explore[0], 1, -1); print_r($decode[0]); //print_r($explore); foreach ($explore as $cpnItm) { $json_decoder = (array)json_decode($decode,true); //print_r($json_decoder[0]); // print_r($json_decoder[0]['PromotionName']); }
Output for git.master, git.master_jit, rfc.property-hooks
"

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:
46.46 ms | 401 KiB | 8 Q