3v4l.org

run code in 300+ PHP versions simultaneously
<?php $_POST["balle"]["x"] = 7; $_POST["balle"]["y"] = 32; $_POST["balle"]["z"] = 17; function Check_post($array,$needle) { if(is_array($array)) { foreach($array as $key=>$value) { if($key == $needle) { return "1"; } else { if(is_array($value)) { check_post($value,$needle); } } } } } $needle = "z"; //$samp = Check_post($_POST,$needle); $samp = Check_post($_POST,$needle); echo $samp; ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/V38VF
function name:  (null)
number of ops:  21
compiled vars:  !0 = $needle, !1 = $samp
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   FETCH_W                      global              $2      '_POST'
          1        FETCH_DIM_W                                      $3      $2, 'balle'
          2        ASSIGN_DIM                                               $3, 'x'
          3        OP_DATA                                                  7
    4     4        FETCH_W                      global              $5      '_POST'
          5        FETCH_DIM_W                                      $6      $5, 'balle'
          6        ASSIGN_DIM                                               $6, 'y'
          7        OP_DATA                                                  32
    5     8        FETCH_W                      global              $8      '_POST'
          9        FETCH_DIM_W                                      $9      $8, 'balle'
         10        ASSIGN_DIM                                               $9, 'z'
         11        OP_DATA                                                  17
   36    12        ASSIGN                                                   !0, 'z'
   40    13        INIT_FCALL                                               'check_post'
         14        FETCH_R                      global              ~12     '_POST'
         15        SEND_VAL                                                 ~12
         16        SEND_VAR                                                 !0
         17        DO_FCALL                                      0  $13     
         18        ASSIGN                                                   !1, $13
   42    19        ECHO                                                     !1
   47    20      > RETURN                                                   1

Function check_post:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 4, Position 2 = 20
Branch analysis from position: 4
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 = 9, Position 2 = 12
Branch analysis from position: 9
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 12
2 jumps found. (Code = 43) Position 1 = 14, Position 2 = 18
Branch analysis from position: 14
1 jumps found. (Code = 42) Position 1 = 5
Branch analysis from position: 5
Branch analysis from position: 18
Branch analysis from position: 19
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 19
Branch analysis from position: 20
filename:       /in/V38VF
function name:  Check_post
number of ops:  21
compiled vars:  !0 = $array, !1 = $needle, !2 = $value, !3 = $key
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   RECV                                             !0      
          1        RECV                                             !1      
   10     2        TYPE_CHECK                                  128          !0
          3      > JMPZ                                                     ~4, ->20
   13     4    > > FE_RESET_R                                       $5      !0, ->19
          5    > > FE_FETCH_R                                       ~6      $5, !2, ->19
          6    >   ASSIGN                                                   !3, ~6
   16     7        IS_EQUAL                                                 !3, !1
          8      > JMPZ                                                     ~8, ->12
   18     9    >   FE_FREE                                                  $5
         10      > RETURN                                                   '1'
         11*       JMP                                                      ->18
   22    12    >   TYPE_CHECK                                  128          !2
         13      > JMPZ                                                     ~9, ->18
   24    14    >   INIT_FCALL_BY_NAME                                       'check_post'
         15        SEND_VAR_EX                                              !2
         16        SEND_VAR_EX                                              !1
         17        DO_FCALL                                      0          
   13    18    > > JMP                                                      ->5
         19    >   FE_FREE                                                  $5
   33    20    > > RETURN                                                   null

End of function check_post

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
168.15 ms | 1402 KiB | 14 Q