3v4l.org

run code in 300+ PHP versions simultaneously
<?php $getAlldate = [ "2018-08-17", "2018-08-20", "2018-08-21", "2018-08-22", "2018-08-23", "2018-08-24", "2018-08-27", "2018-08-28" ]; $getHoliday=[ "2019-1-1", "2019-3-6", "2019-2-28", "2019-5-2", "2019-4-25", "2018-8-27", "2018-8-28" ]; $formattedHoliday = array_map(function ($holiday) { $alldateFormat = 'Y-m-d'; $HolidayFormat = 'Y-n-d'; $date = DateTime::createFromFormat($HolidayFormat, $holiday); return $date->format($alldateFormat); }, $getHoliday); var_dump(array_diff($getAlldate, $formattedHoliday));
Output for git.master, git.master_jit, rfc.property-hooks
array(6) { [0]=> string(10) "2018-08-17" [1]=> string(10) "2018-08-20" [2]=> string(10) "2018-08-21" [3]=> string(10) "2018-08-22" [4]=> string(10) "2018-08-23" [5]=> string(10) "2018-08-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:
30.03 ms | 406 KiB | 5 Q