3v4l.org

run code in 300+ PHP versions simultaneously
<?php function checkFields(array $fields) { foreach ($fields as $k => $v) { if (!isset($v) || $v == "") { return FALSE; } } return TRUE; } var_dump(checkFields(array('k' => '')));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ddbRo
function name:  (null)
number of ops:  7
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   INIT_FCALL                                               'var_dump'
          1        INIT_FCALL                                               'checkfields'
          2        SEND_VAL                                                 <array>
          3        DO_FCALL                                      0  $0      
          4        SEND_VAR                                                 $0
          5        DO_ICALL                                                 
          6      > RETURN                                                   1

Function checkfields:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 2, Position 2 = 13
Branch analysis from position: 2
2 jumps found. (Code = 78) Position 1 = 3, Position 2 = 13
Branch analysis from position: 3
2 jumps found. (Code = 47) Position 1 = 7, Position 2 = 9
Branch analysis from position: 7
2 jumps found. (Code = 43) Position 1 = 10, Position 2 = 12
Branch analysis from position: 10
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 12
1 jumps found. (Code = 42) Position 1 = 2
Branch analysis from position: 2
Branch analysis from position: 9
Branch analysis from position: 13
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 13
filename:       /in/ddbRo
function name:  checkFields
number of ops:  16
compiled vars:  !0 = $fields, !1 = $v, !2 = $k
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   RECV                                             !0      
    3     1      > FE_RESET_R                                       $3      !0, ->13
          2    > > FE_FETCH_R                                       ~4      $3, !1, ->13
          3    >   ASSIGN                                                   !2, ~4
    4     4        ISSET_ISEMPTY_CV                                 ~6      !1
          5        BOOL_NOT                                         ~7      ~6
          6      > JMPNZ_EX                                         ~7      ~7, ->9
          7    >   IS_EQUAL                                         ~8      !1, ''
          8        BOOL                                             ~7      ~8
          9    > > JMPZ                                                     ~7, ->12
    5    10    >   FE_FREE                                                  $3
         11      > RETURN                                                   <false>
    3    12    > > JMP                                                      ->2
         13    >   FE_FREE                                                  $3
    8    14      > RETURN                                                   <true>
    9    15*     > RETURN                                                   null

End of function checkfields

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
150.46 ms | 1390 KiB | 16 Q