3v4l.org

run code in 300+ PHP versions simultaneously
<?php $sql = array("inUserID" =>7250, "inCustID" =>15319, "btAll" => "'True'", "btPermPref" => "'True'", "inDisplay"=>0); function pram_alter($array) { //echo implode(',', each($array)); reset($array); $pStr=null; $sqlStatment=null; $bound = count($array); $endSqlStatement = ";"; $count=0; while (list($key, $val) = each($array)) { if ($count < ($bound-1)){ $pStr=$pStr."$key = $val, "; } else { $pStr=$pStr."$key =$val;\" "; } $strproc='myProc'; $sqlStatment="\"exec " . $strproc . " " . $pStr; $count ++; } return $sqlStatment; } $temp=pram_alter($sql); echo $temp; ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/iUXC1
function name:  (null)
number of ops:  7
compiled vars:  !0 = $sql, !1 = $temp
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
   29     1        INIT_FCALL                                               'pram_alter'
          2        SEND_VAR                                                 !0
          3        DO_FCALL                                      0  $3      
          4        ASSIGN                                                   !1, $3
   30     5        ECHO                                                     !1
   31     6      > RETURN                                                   1

Function pram_alter:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 33
Branch analysis from position: 33
2 jumps found. (Code = 44) Position 1 = 41, Position 2 = 11
Branch analysis from position: 41
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 11
2 jumps found. (Code = 43) Position 1 = 14, Position 2 = 21
Branch analysis from position: 14
1 jumps found. (Code = 42) Position 1 = 27
Branch analysis from position: 27
2 jumps found. (Code = 44) Position 1 = 41, Position 2 = 11
Branch analysis from position: 41
Branch analysis from position: 11
Branch analysis from position: 21
2 jumps found. (Code = 44) Position 1 = 41, Position 2 = 11
Branch analysis from position: 41
Branch analysis from position: 11
filename:       /in/iUXC1
function name:  pram_alter
number of ops:  43
compiled vars:  !0 = $array, !1 = $pStr, !2 = $sqlStatment, !3 = $bound, !4 = $endSqlStatement, !5 = $count, !6 = $key, !7 = $val, !8 = $strproc
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   RECV                                             !0      
    7     1        INIT_FCALL                                               'reset'
          2        SEND_REF                                                 !0
          3        DO_ICALL                                                 
    8     4        ASSIGN                                                   !1, null
    9     5        ASSIGN                                                   !2, null
   10     6        COUNT                                            ~12     !0
          7        ASSIGN                                                   !3, ~12
   11     8        ASSIGN                                                   !4, '%3B'
   12     9        ASSIGN                                                   !5, 0
   13    10      > JMP                                                      ->33
   15    11    >   SUB                                              ~16     !3, 1
         12        IS_SMALLER                                               !5, ~16
         13      > JMPZ                                                     ~17, ->21
   16    14    >   ROPE_INIT                                     4  ~19     !6
         15        ROPE_ADD                                      1  ~19     ~19, '+%3D+'
         16        ROPE_ADD                                      2  ~19     ~19, !7
         17        ROPE_END                                      3  ~18     ~19, '%2C+'
         18        CONCAT                                           ~21     !1, ~18
         19        ASSIGN                                                   !1, ~21
         20      > JMP                                                      ->27
   20    21    >   ROPE_INIT                                     4  ~24     !6
         22        ROPE_ADD                                      1  ~24     ~24, '+%3D'
         23        ROPE_ADD                                      2  ~24     ~24, !7
         24        ROPE_END                                      3  ~23     ~24, '%3B%22+'
         25        CONCAT                                           ~26     !1, ~23
         26        ASSIGN                                                   !1, ~26
   22    27    >   ASSIGN                                                   !8, 'myProc'
   23    28        CONCAT                                           ~29     '%22exec+', !8
         29        CONCAT                                           ~30     ~29, '+'
         30        CONCAT                                           ~31     ~30, !1
         31        ASSIGN                                                   !2, ~31
   24    32        PRE_INC                                                  !5
   13    33    >   INIT_FCALL_BY_NAME                                       'each'
         34        SEND_VAR_EX                                              !0
         35        DO_FCALL                                      0  $34     
         36        FETCH_LIST_R                                     $35     $34, 0
         37        ASSIGN                                                   !6, $35
         38        FETCH_LIST_R                                     $37     $34, 1
         39        ASSIGN                                                   !7, $37
         40      > JMPNZ                                                    $34, ->11
   26    41    > > RETURN                                                   !2
   27    42*     > RETURN                                                   null

End of function pram_alter

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
150.15 ms | 1407 KiB | 16 Q