3v4l.org

run code in 300+ PHP versions simultaneously
<?php $data = ['staffId' => '1111', 'password' => '']; function data_foreach($data) { foreach($data as $key => $val) { $d[$key] = $val; if($d[$key] === '') { $boolVal[] = FALSE; } else { if(!is_numeric($d[$key])) { $boolVal[] = FALSE; } else { $boolVal[] = TRUE; } } } return (in_array(FALSE, $boolVal, true)) ? FALSE : TRUE; } var_dump(data_foreach($data));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/J681j
function name:  (null)
number of ops:  8
compiled vars:  !0 = $data
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
   21     1        INIT_FCALL                                               'var_dump'
          2        INIT_FCALL                                               'data_foreach'
          3        SEND_VAR                                                 !0
          4        DO_FCALL                                      0  $2      
          5        SEND_VAR                                                 $2
          6        DO_ICALL                                                 
          7      > RETURN                                                   1

Function data_foreach:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 2, Position 2 = 24
Branch analysis from position: 2
2 jumps found. (Code = 78) Position 1 = 3, Position 2 = 24
Branch analysis from position: 3
2 jumps found. (Code = 43) Position 1 = 9, Position 2 = 12
Branch analysis from position: 9
1 jumps found. (Code = 42) Position 1 = 23
Branch analysis from position: 23
1 jumps found. (Code = 42) Position 1 = 2
Branch analysis from position: 2
Branch analysis from position: 12
2 jumps found. (Code = 43) Position 1 = 18, Position 2 = 21
Branch analysis from position: 18
1 jumps found. (Code = 42) Position 1 = 23
Branch analysis from position: 23
Branch analysis from position: 21
1 jumps found. (Code = 42) Position 1 = 2
Branch analysis from position: 2
Branch analysis from position: 24
2 jumps found. (Code = 43) Position 1 = 31, Position 2 = 33
Branch analysis from position: 31
1 jumps found. (Code = 42) Position 1 = 34
Branch analysis from position: 34
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 33
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 24
filename:       /in/J681j
function name:  data_foreach
number of ops:  36
compiled vars:  !0 = $data, !1 = $val, !2 = $key, !3 = $d, !4 = $boolVal
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   RECV                                             !0      
    6     1      > FE_RESET_R                                       $5      !0, ->24
          2    > > FE_FETCH_R                                       ~6      $5, !1, ->24
          3    >   ASSIGN                                                   !2, ~6
    7     4        ASSIGN_DIM                                               !3, !2
          5        OP_DATA                                                  !1
    8     6        FETCH_DIM_R                                      ~9      !3, !2
          7        IS_IDENTICAL                                             ~9, ''
          8      > JMPZ                                                     ~10, ->12
    9     9    >   ASSIGN_DIM                                               !4
         10        OP_DATA                                                  <false>
         11      > JMP                                                      ->23
   11    12    >   INIT_FCALL                                               'is_numeric'
         13        FETCH_DIM_R                                      ~12     !3, !2
         14        SEND_VAL                                                 ~12
         15        DO_ICALL                                         $13     
         16        BOOL_NOT                                         ~14     $13
         17      > JMPZ                                                     ~14, ->21
   12    18    >   ASSIGN_DIM                                               !4
         19        OP_DATA                                                  <false>
         20      > JMP                                                      ->23
   14    21    >   ASSIGN_DIM                                               !4
         22        OP_DATA                                                  <true>
    6    23    > > JMP                                                      ->2
         24    >   FE_FREE                                                  $5
   18    25        INIT_FCALL                                               'in_array'
         26        SEND_VAL                                                 <false>
         27        SEND_VAR                                                 !4
         28        SEND_VAL                                                 <true>
         29        DO_ICALL                                         $17     
         30      > JMPZ                                                     $17, ->33
         31    >   QM_ASSIGN                                        ~18     <false>
         32      > JMP                                                      ->34
         33    >   QM_ASSIGN                                        ~18     <true>
         34    > > RETURN                                                   ~18
   19    35*     > RETURN                                                   null

End of function data_foreach

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
162.23 ms | 1403 KiB | 20 Q