3v4l.org

run code in 500+ PHP versions simultaneously
<?php $prop['created_date'] = '2022-04-07 13:38:15.000000'; $obj['files'] = [ ["20220407_10_22_30_L100.SVL", 2, "20220407", 4766, 307, 101366, "2022-04-07 13:24:10"], ["20220407_10_22_30_L101.SVL", 3, "20220407", 4767, 308, 101367, "2022-04-07 13:29:10"], ["20220407_10_22_30_L102.SVL", 4, "20220407", 4768, 309, 101368, "2022-04-07 13:34:10"], ["20220407_10_22_30_L103.SVL", 5, "20220407", 4769, 310, 101369, "2022-04-07 13:39:10"], ["20220407_10_22_30_L104.SVL", 6, "20220407", 4770, 311, 101370, "2022-04-07 13:44:10"], ["20220407_10_22_30_L105.SVL", 7, "20220407", 4771, 312, 101371, "2022-04-07 13:49:10"], ]; // prepare the date range data only once, before looping $from = date('Y-m-d H:i:s', strtotime($prop['created_date'] . ' - 10 minutes')); $to = date('Y-m-d H:i:s', strtotime($prop['created_date'] . ' + 10 minutes')); $result =[]; foreach ($obj['files'] as $file) { if ($from <= $file[6] && $file[6] <= $to) { $result[] = [$file[0], $file[6]]; } } var_export($result);
Output for rfc.property-hooks, git.master, git.master_jit
array ( 0 => array ( 0 => '20220407_10_22_30_L101.SVL', 1 => '2022-04-07 13:29:10', ), 1 => array ( 0 => '20220407_10_22_30_L102.SVL', 1 => '2022-04-07 13:34:10', ), 2 => array ( 0 => '20220407_10_22_30_L103.SVL', 1 => '2022-04-07 13:39:10', ), 3 => array ( 0 => '20220407_10_22_30_L104.SVL', 1 => '2022-04-07 13:44:10', ), )

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:
42.65 ms | 1320 KiB | 4 Q