3v4l.org

run code in 300+ PHP versions simultaneously
<?php $mybalance = '{ "responseData": [ { "totalValue": 0.0, "active": "Oct 16, 2019 11:16:23 AM", "expired": "Mar 28, 2020 3:15:58 PM" }, { "totalValue": 0.0, "active": "Oct 16, 2019 11:16:23 AM", "expired": "Mar 28, 2020 3:15:58 PM" }, { "totalValue": 0, "active": "Jun 25, 2019 6:34:59 PM", "expired": "Oct 16, 2020 11:10:32 AM" } ], "responseMessage": "success", "responseCode": 0 }'; date_default_timezone_set('UTC'); $json = json_decode($mybalance, true); foreach($json['responseData'] as $key=>$value){ if(strtotime($value['expired']) < strtotime(date('M d, Y H:i:s A'))){ unset($json['responseData'][$key]); } } echo json_encode($json);
Output for git.master, git.master_jit, rfc.property-hooks
{"responseData":{"2":{"totalValue":0,"active":"Jun 25, 2019 6:34:59 PM","expired":"Oct 16, 2020 11:10:32 AM"}},"responseMessage":"success","responseCode":0}

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:
146.82 ms | 405 KiB | 5 Q