3v4l.org

run code in 150+ 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."\n"; }
Output for 4.3.0 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
2012-04-15 2013-05-05 2014-04-20 2015-04-12 2016-05-01 2017-04-16 2018-04-08