3v4l.org

run code in 300+ PHP versions simultaneously
<?php $_POST["balle"]["x"] = 7; $_POST["balle"]["y"] = 32; $_POST["balle"]["z"] = 17; $needle = "z"; $samp = Check_post($_POST,$needle); echo Check_post($_POST,$needle); 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); } } } } } ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/sCG7R
function name:  (null)
number of ops:  28
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
   11    12        ASSIGN                                                   !0, 'z'
   13    13        INIT_FCALL_BY_NAME                                       'Check_post'
         14        CHECK_FUNC_ARG                                           
         15        FETCH_FUNC_ARG               global              $12     '_POST'
         16        SEND_FUNC_ARG                                            $12
         17        SEND_VAR_EX                                              !0
         18        DO_FCALL                                      0  $13     
         19        ASSIGN                                                   !1, $13
   16    20        INIT_FCALL_BY_NAME                                       'Check_post'
         21        CHECK_FUNC_ARG                                           
         22        FETCH_FUNC_ARG               global              $15     '_POST'
         23        SEND_FUNC_ARG                                            $15
         24        SEND_VAR_EX                                              !0
         25        DO_FCALL                                      0  $16     
         26        ECHO                                                     $16
   47    27      > 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/sCG7R
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
-------------------------------------------------------------------------------------
   20     0  E >   RECV                                             !0      
          1        RECV                                             !1      
   22     2        TYPE_CHECK                                  128          !0
          3      > JMPZ                                                     ~4, ->20
   25     4    > > FE_RESET_R                                       $5      !0, ->19
          5    > > FE_FETCH_R                                       ~6      $5, !2, ->19
          6    >   ASSIGN                                                   !3, ~6
   28     7        IS_EQUAL                                                 !3, !1
          8      > JMPZ                                                     ~8, ->12
   30     9    >   FE_FREE                                                  $5
         10      > RETURN                                                   '1'
         11*       JMP                                                      ->18
   34    12    >   TYPE_CHECK                                  128          !2
         13      > JMPZ                                                     ~9, ->18
   36    14    >   INIT_FCALL_BY_NAME                                       'check_post'
         15        SEND_VAR_EX                                              !2
         16        SEND_VAR_EX                                              !1
         17        DO_FCALL                                      0          
   25    18    > > JMP                                                      ->5
         19    >   FE_FREE                                                  $5
   45    20    > > RETURN                                                   null

End of function check_post

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.95 ms | 1390 KiB | 13 Q