3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php function easterOrthodox_date($year) { $a = $year % 4; $b = $year % 7; $c = $year % 19; $d = (19 * $c + 15) % 30; $e = (2 * $a + 4 * $b - $d + 34) % 7; $month = floor(($d + $e + 114) / 31); $day = (($d + $e + 114) % 31) + 1; $de = @mktime(0, 0, 0, $month, $day + 13, $year); return $de; } $years = array('2012', '2013', '2014', '2015', '2016', '2017', '2018'); foreach($years as $selYear) { $EasterOrth = @date('Y-m-d', @easterOrthodox_date($selYear)); } echo $EasterOrth."<br/>";
Output for 4.3.0 - 7.1.7
2018-04-08<br/>