3v4l.org

run code in 500+ 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)) { 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/b3OYo
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>
   21     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 = 17
Branch analysis from position: 3
2 jumps found. (Code = 78) Position 1 = 4, Position 2 = 17
Branch analysis from position: 4
2 jumps found. (Code = 43) Position 1 = 7, Position 2 = 12
Branch analysis from position: 7
1 jumps found. (Code = 42) Position 1 = 16
Branch analysis from position: 16
1 jumps found. (Code = 42) Position 1 = 3
Branch analysis from position: 3
Branch analysis from position: 12
1 jumps found. (Code = 42) Position 1 = 3
Branch analysis from position: 3
Branch analysis from position: 17
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 17
filename:       /in/b3OYo
function name:  bqs
number of ops:  20
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, ->17
          3    > > FE_FETCH_R                                           ~5      $4, !2, ->17
          4    >   ASSIGN                                                       !3, ~5
    9     5        TYPE_CHECK                                      128          !2
          6      > JMPZ                                                         ~7, ->12
   11     7    >   INIT_FCALL_BY_NAME                                           'bqs'
          8        SEND_VAR_EX                                                  !2
          9        SEND_VAR_EX                                                  !1
         10        DO_FCALL                                          0          
    9    11      > JMP                                                          ->16
   15    12    >   CONCAT                                               ~9      !3, '%3D'
         13        CONCAT                                               ~10     ~9, !2
         14        CONCAT                                               ~11     ~10, '%26'
         15        ASSIGN_OP                                         8          !1, ~11
    7    16    > > JMP                                                          ->3
         17    >   FE_FREE                                                      $4
   18    18      > RETURN                                                       !1
   19    19*     > RETURN                                                       null

End of function bqs

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
175.7 ms | 2771 KiB | 14 Q