3v4l.org

run code in 300+ PHP versions simultaneously
<?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"; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 2, Position 2 = 18
Branch analysis from position: 2
2 jumps found. (Code = 78) Position 1 = 3, Position 2 = 18
Branch analysis from position: 3
1 jumps found. (Code = 42) Position 1 = 2
Branch analysis from position: 2
Branch analysis from position: 18
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 18
filename:       /in/nDEhr
function name:  (null)
number of ops:  20
compiled vars:  !0 = $years, !1 = $selYear, !2 = $EasterOrth
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   17     0  E >   ASSIGN                                                   !0, <array>
   19     1      > FE_RESET_R                                       $4      !0, ->18
          2    > > FE_FETCH_R                                               $4, !1, ->18
   21     3    >   BEGIN_SILENCE                                    ~5      
          4        INIT_FCALL                                               'date'
          5        SEND_VAL                                                 'Y-m-d'
          6        BEGIN_SILENCE                                    ~6      
          7        INIT_FCALL                                               'easterorthodox_date'
          8        SEND_VAR                                                 !1
          9        DO_FCALL                                      0  $7      
         10        END_SILENCE                                              ~6
         11        SEND_VAR                                                 $7
         12        DO_ICALL                                         $8      
         13        END_SILENCE                                              ~5
         14        ASSIGN                                                   !2, $8
   22    15        CONCAT                                           ~10     !2, '%0A'
         16        ECHO                                                     ~10
   19    17      > JMP                                                      ->2
         18    >   FE_FREE                                                  $4
   23    19      > RETURN                                                   1

Function easterorthodox_date:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/nDEhr
function name:  easterOrthodox_date
number of ops:  44
compiled vars:  !0 = $year, !1 = $a, !2 = $b, !3 = $c, !4 = $d, !5 = $e, !6 = $month, !7 = $day, !8 = $de
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
    4     1        MOD                                              ~9      !0, 4
          2        ASSIGN                                                   !1, ~9
    5     3        MOD                                              ~11     !0, 7
          4        ASSIGN                                                   !2, ~11
    6     5        MOD                                              ~13     !0, 19
          6        ASSIGN                                                   !3, ~13
    7     7        MUL                                              ~15     !3, 19
          8        ADD                                              ~16     ~15, 15
          9        MOD                                              ~17     ~16, 30
         10        ASSIGN                                                   !4, ~17
    8    11        MUL                                              ~19     !1, 2
         12        MUL                                              ~20     !2, 4
         13        ADD                                              ~21     ~19, ~20
         14        SUB                                              ~22     ~21, !4
         15        ADD                                              ~23     ~22, 34
         16        MOD                                              ~24     ~23, 7
         17        ASSIGN                                                   !5, ~24
    9    18        INIT_FCALL                                               'floor'
         19        ADD                                              ~26     !4, !5
         20        ADD                                              ~27     ~26, 114
         21        DIV                                              ~28     ~27, 31
         22        SEND_VAL                                                 ~28
         23        DO_ICALL                                         $29     
         24        ASSIGN                                                   !6, $29
   10    25        ADD                                              ~31     !4, !5
         26        ADD                                              ~32     ~31, 114
         27        MOD                                              ~33     ~32, 31
         28        ADD                                              ~34     ~33, 1
         29        ASSIGN                                                   !7, ~34
   12    30        BEGIN_SILENCE                                    ~36     
         31        INIT_FCALL                                               'mktime'
         32        SEND_VAL                                                 0
         33        SEND_VAL                                                 0
         34        SEND_VAL                                                 0
         35        SEND_VAR                                                 !6
         36        ADD                                              ~37     !7, 13
         37        SEND_VAL                                                 ~37
         38        SEND_VAR                                                 !0
         39        DO_ICALL                                         $38     
         40        END_SILENCE                                              ~36
         41        ASSIGN                                                   !8, $38
   14    42      > RETURN                                                   !8
   15    43*     > RETURN                                                   null

End of function easterorthodox_date

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.1 ms | 1394 KiB | 20 Q