3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $workers = Array( Array('name' => 'Иван Иванович Петров', 'bd' => '19.02.1974', 'sex' => 1), Array('name' => 'Ольга Михайловна Северова', 'bd' => '20.02.1984', 'sex' => 2), Array('name' => 'Виталий Олегович Кириллов', 'bd' => '21.02.1963', 'sex' => 1) ); $days = 10; $holy_workers = []; $date = new DateTimeImmutable(); foreach (range(0, $days) as $i) $holydays[] = $date->add(new DateInterval("P{$i}D"))->format('d.m'); foreach ($workers as $worker) if (in_array(substr($worker['bd'], 0, 5), $holydays)) $holy_workers[] = $worker; print_r($holy_workers);
based on J1N3v
Output for 5.6.0 - 5.6.30, hhvm-3.18.5 - 3.22.0, 7.0.0 - 7.3.0rc3
Array ( )