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

End of function pram_alter

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
177.13 ms | 1402 KiB | 16 Q