3v4l.org

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

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

End of function bqs

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
155.36 ms | 1403 KiB | 14 Q