3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr = array('order_source' => array('google','facebook'), 'order_medium' => 'google-text'); function bqs($array, $qs='') { foreach($array as $par => $val) { if(is_array($val)) { print_r($val); exit; bqs($val, $qs); } else { $qs .= $par.'='.$val.'&'; } } return $qs; } echo $qss = bqs($arr);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/rvTSo
function name:  (null)
number of ops:  7
compiled vars:  !0 = $arr, !1 = $qss
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
   22     1        INIT_FCALL                                               'bqs'
          2        SEND_VAR                                                 !0
          3        DO_FCALL                                      0  $3      
          4        ASSIGN                                           ~4      !1, $3
          5        ECHO                                                     ~4
          6      > RETURN                                                   1

Function bqs:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 3, Position 2 = 21
Branch analysis from position: 3
2 jumps found. (Code = 78) Position 1 = 4, Position 2 = 21
Branch analysis from position: 4
2 jumps found. (Code = 43) Position 1 = 7, Position 2 = 16
Branch analysis from position: 7
1 jumps found. (Code = 79) Position 1 = -2
Branch analysis from position: 16
1 jumps found. (Code = 42) Position 1 = 3
Branch analysis from position: 3
Branch analysis from position: 21
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 21
filename:       /in/rvTSo
function name:  bqs
number of ops:  24
compiled vars:  !0 = $array, !1 = $qs, !2 = $val, !3 = $par
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   RECV                                             !0      
          1        RECV_INIT                                        !1      ''
    7     2      > FE_RESET_R                                       $4      !0, ->21
          3    > > FE_FETCH_R                                       ~5      $4, !2, ->21
          4    >   ASSIGN                                                   !3, ~5
    9     5        TYPE_CHECK                                  128          !2
          6      > JMPZ                                                     ~7, ->16
   11     7    >   INIT_FCALL                                               'print_r'
          8        SEND_VAR                                                 !2
          9        DO_ICALL                                                 
         10      > EXIT                                                     
   12    11*       INIT_FCALL_BY_NAME                                       'bqs'
         12*       SEND_VAR_EX                                              !2
         13*       SEND_VAR_EX                                              !1
         14*       DO_FCALL                                      0          
         15*       JMP                                                      ->20
   16    16    >   CONCAT                                           ~10     !3, '%3D'
         17        CONCAT                                           ~11     ~10, !2
         18        CONCAT                                           ~12     ~11, '%26'
         19        ASSIGN_OP                                     8          !1, ~12
    7    20      > JMP                                                      ->3
         21    >   FE_FREE                                                  $4
   19    22      > RETURN                                                   !1
   20    23*     > RETURN                                                   null

End of function bqs

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
159.25 ms | 1399 KiB | 16 Q