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) {$t =0; if(is_array($array)) { foreach($array as $key=>$value) { if($key == $needle) { $t =1; } else { if(is_array($value)) { check_post($value,$needle); } } } } if($t == 1) return "1"; } $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/1QWg9
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
   38    12        ASSIGN                                                   !0, 'z'
   42    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
   44    19        ECHO                                                     !1
   49    20      > RETURN                                                   1

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

End of function check_post

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
157.97 ms | 1403 KiB | 14 Q