3v4l.org

run code in 300+ PHP versions simultaneously
<?php $eventDates = []; $startingDate = "2020-10-20"; $daysBetween = ["2020-10-21", "2020-10-22", "2020-10-23"]; $endingDate = "2020-10-24"; $eventDates[5] = [ "startingDate" => $startingDate, "daysBetween" => $daysBetween, "endingDate" => $endingDate, ]; $startingDate = "2020-09-20"; $daysBetween = ["2020-09-21", "2020-09-22", "2020-09-23"]; $endingDate = "2020-09-24"; $eventDates[10] = [ "startingDate" => $startingDate, "daysBetween" => $daysBetween, "endingDate" => $endingDate, ]; $searchFor = '2020-09-20'; $result = array_filter($eventDates, function($v) use ($searchFor) { return ($v['startingDate'] ?? null) == $searchFor; }); print_r($result);
Output for git.master, git.master_jit, rfc.property-hooks
Array ( [10] => Array ( [startingDate] => 2020-09-20 [daysBetween] => Array ( [0] => 2020-09-21 [1] => 2020-09-22 [2] => 2020-09-23 ) [endingDate] => 2020-09-24 ) )

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:
120.75 ms | 406 KiB | 5 Q