3v4l.org

run code in 300+ PHP versions simultaneously
<?php /** * sexInList method * * Method to return a sex inlist array for the chosen team level for the dynamically created sex validation rule. * * @param string $level_id * @return array */ function sexInList($level_id) { $male = '0'; $female = 1; if ($male && $female) { return array('M', 'F'); } if ($male && !$female) { return array('M'); } if ($female && !male) { return array('F'); } } print_r(sexInList(null));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/5LjYF
function name:  (null)
number of ops:  7
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   22     0  E >   INIT_FCALL                                               'print_r'
          1        INIT_FCALL                                               'sexinlist'
          2        SEND_VAL                                                 null
          3        DO_FCALL                                      0  $0      
          4        SEND_VAR                                                 $0
          5        DO_ICALL                                                 
          6      > RETURN                                                   1

Function sexinlist:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 46) Position 1 = 4, Position 2 = 5
Branch analysis from position: 4
2 jumps found. (Code = 43) Position 1 = 6, Position 2 = 7
Branch analysis from position: 6
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 7
2 jumps found. (Code = 46) Position 1 = 8, Position 2 = 10
Branch analysis from position: 8
2 jumps found. (Code = 43) Position 1 = 11, Position 2 = 12
Branch analysis from position: 11
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 12
2 jumps found. (Code = 46) Position 1 = 13, Position 2 = 16
Branch analysis from position: 13
2 jumps found. (Code = 43) Position 1 = 17, Position 2 = 18
Branch analysis from position: 17
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 18
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 16
Branch analysis from position: 10
Branch analysis from position: 5
filename:       /in/5LjYF
function name:  sexInList
number of ops:  19
compiled vars:  !0 = $level_id, !1 = $male, !2 = $female
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   RECV                                             !0      
   12     1        ASSIGN                                                   !1, '0'
   13     2        ASSIGN                                                   !2, 1
   15     3      > JMPZ_EX                                          ~5      !1, ->5
          4    >   BOOL                                             ~5      !2
          5    > > JMPZ                                                     ~5, ->7
          6    > > RETURN                                                   <array>
   17     7    > > JMPZ_EX                                          ~6      !1, ->10
          8    >   BOOL_NOT                                         ~7      !2
          9        BOOL                                             ~6      ~7
         10    > > JMPZ                                                     ~6, ->12
         11    > > RETURN                                                   <array>
   19    12    > > JMPZ_EX                                          ~8      !2, ->16
         13    >   FETCH_CONSTANT                                   ~9      'male'
         14        BOOL_NOT                                         ~10     ~9
         15        BOOL                                             ~8      ~10
         16    > > JMPZ                                                     ~8, ->18
         17    > > RETURN                                                   <array>
   20    18    > > RETURN                                                   null

End of function sexinlist

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
169.83 ms | 1399 KiB | 16 Q