3v4l.org

run code in 300+ PHP versions simultaneously
<?php function abominable_is_leap_year($year) { if ($year % 4 == 0) goto verify; goto no; verify: if ($year % 100 != 0) goto yes; if ($year % 400 == 0) goto yes; no: return false; yes: return true; } foreach (range(0, 2020) as $year) printf("%d: %s\n", $year, abominable_is_leap_year($year) ? "yes" : "no"); ?>
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 5, Position 2 = 19
Branch analysis from position: 5
2 jumps found. (Code = 78) Position 1 = 6, Position 2 = 19
Branch analysis from position: 6
2 jumps found. (Code = 43) Position 1 = 13, Position 2 = 15
Branch analysis from position: 13
1 jumps found. (Code = 42) Position 1 = 16
Branch analysis from position: 16
1 jumps found. (Code = 42) Position 1 = 5
Branch analysis from position: 5
Branch analysis from position: 15
1 jumps found. (Code = 42) Position 1 = 5
Branch analysis from position: 5
Branch analysis from position: 19
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 19
filename:       /in/FU3km
function name:  (null)
number of ops:  21
compiled vars:  !0 = $year
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   17     0  E >   INIT_FCALL                                               'range'
          1        SEND_VAL                                                 0
          2        SEND_VAL                                                 2020
          3        DO_ICALL                                         $1      
          4      > FE_RESET_R                                       $2      $1, ->19
          5    > > FE_FETCH_R                                               $2, !0, ->19
   18     6    >   INIT_FCALL                                               'printf'
          7        SEND_VAL                                                 '%25d%3A+%25s%0A'
   19     8        SEND_VAR                                                 !0
   20     9        INIT_FCALL                                               'abominable_is_leap_year'
         10        SEND_VAR                                                 !0
         11        DO_FCALL                                      0  $3      
         12      > JMPZ                                                     $3, ->15
         13    >   QM_ASSIGN                                        ~4      'yes'
         14      > JMP                                                      ->16
         15    >   QM_ASSIGN                                        ~4      'no'
         16    >   SEND_VAL                                                 ~4
         17        DO_ICALL                                                 
   17    18      > JMP                                                      ->5
         19    >   FE_FREE                                                  $2
   21    20      > RETURN                                                   1

Function abominable_is_leap_year:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 4, Position 2 = 5
Branch analysis from position: 4
1 jumps found. (Code = 42) Position 1 = 6
Branch analysis from position: 6
2 jumps found. (Code = 43) Position 1 = 9, Position 2 = 10
Branch analysis from position: 9
1 jumps found. (Code = 42) Position 1 = 15
Branch analysis from position: 15
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 10
2 jumps found. (Code = 43) Position 1 = 13, Position 2 = 14
Branch analysis from position: 13
1 jumps found. (Code = 42) Position 1 = 15
Branch analysis from position: 15
Branch analysis from position: 14
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 5
1 jumps found. (Code = 42) Position 1 = 14
Branch analysis from position: 14
filename:       /in/FU3km
function name:  abominable_is_leap_year
number of ops:  17
compiled vars:  !0 = $year
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   RECV                                             !0      
    3     1        MOD                                              ~1      !0, 4
          2        IS_EQUAL                                                 ~1, 0
          3      > JMPZ                                                     ~2, ->5
    4     4    > > JMP                                                      ->6
    5     5    > > JMP                                                      ->14
    7     6    >   MOD                                              ~3      !0, 100
          7        IS_NOT_EQUAL                                             ~3, 0
          8      > JMPZ                                                     ~4, ->10
    8     9    > > JMP                                                      ->15
    9    10    >   MOD                                              ~5      !0, 400
         11        IS_EQUAL                                                 ~5, 0
         12      > JMPZ                                                     ~6, ->14
   10    13    > > JMP                                                      ->15
   12    14    > > RETURN                                                   <false>
   14    15    > > RETURN                                                   <true>
   15    16*     > RETURN                                                   null

End of function abominable_is_leap_year

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
128.65 ms | 1407 KiB | 18 Q