3v4l.org

run code in 300+ PHP versions simultaneously
<?php date_default_timezone_set('America/New_York'); $start = new DateTime('this year'); $end = new DateTime('+10 years'); $interval = new DateInterval('P1Y'); $adjust = 'fourth thursday of November'; $period = new DatePeriod($start, $interval, $end); foreach($period as $holiday) { $holiday->modify($adjust); echo "Thanksgiving in {$holiday->format('Y')} will be on {$holiday->format('l F jS')}\n"; }
Output for git.master, git.master_jit, rfc.property-hooks
Thanksgiving in 2014 will be on Thursday November 27th Thanksgiving in 2015 will be on Thursday November 26th Thanksgiving in 2016 will be on Thursday November 24th Thanksgiving in 2017 will be on Thursday November 23rd Thanksgiving in 2018 will be on Thursday November 22nd Thanksgiving in 2019 will be on Thursday November 28th Thanksgiving in 2020 will be on Thursday November 26th Thanksgiving in 2021 will be on Thursday November 25th Thanksgiving in 2022 will be on Thursday November 24th Thanksgiving in 2023 will be on Thursday November 23rd

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:
48.21 ms | 402 KiB | 8 Q