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 . "';"; echo $count; echo $bound; } 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/N6JsY
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>
   34     1        INIT_FCALL                                               'pram_alter'
          2        SEND_VAR                                                 !0
          3        SEND_VAL                                                 'pram_alter'
          4        DO_FCALL                                      0  $3      
          5        ASSIGN                                                   !1, $3
   35     6        ECHO                                                     !1
   36     7      > RETURN                                                   1

Function pram_alter:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 35
Branch analysis from position: 35
2 jumps found. (Code = 44) Position 1 = 43, Position 2 = 12
Branch analysis from position: 43
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 12
2 jumps found. (Code = 43) Position 1 = 14, Position 2 = 23
Branch analysis from position: 14
1 jumps found. (Code = 42) Position 1 = 29
Branch analysis from position: 29
2 jumps found. (Code = 44) Position 1 = 43, Position 2 = 12
Branch analysis from position: 43
Branch analysis from position: 12
Branch analysis from position: 23
2 jumps found. (Code = 44) Position 1 = 43, Position 2 = 12
Branch analysis from position: 43
Branch analysis from position: 12
filename:       /in/N6JsY
function name:  pram_alter
number of ops:  46
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                                                      ->35
   15    12    >   ASSIGN                                           ~16     !6, !4
         13      > JMPZ                                                     ~16, ->23
   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
   17    20        ECHO                                                     !6
   18    21        ECHO                                                     !4
         22      > JMP                                                      ->29
   22    23    >   NOP                                                      
         24        FAST_CONCAT                                      ~22     !1, '+%3D%27'
         25        CONCAT                                           ~23     !2, ~22
         26        CONCAT                                           ~24     ~23, !7
         27        CONCAT                                           ~25     ~24, '%27%2C'
         28        ASSIGN                                                   !2, ~25
   24    29    >   ASSIGN                                                   !8, 'myProc'
   25    30        CONCAT                                           ~28     'exec+', !8
         31        CONCAT                                           ~29     ~28, '+'
         32        CONCAT                                           ~30     ~29, !2
         33        ASSIGN                                                   !3, ~30
   26    34        PRE_INC                                                  !6
   13    35    >   INIT_FCALL_BY_NAME                                       'each'
         36        SEND_VAR_EX                                              !0
         37        DO_FCALL                                      0  $33     
         38        FETCH_LIST_R                                     $34     $33, 0
         39        ASSIGN                                                   !1, $34
         40        FETCH_LIST_R                                     $36     $33, 1
         41        ASSIGN                                                   !7, $36
         42      > JMPNZ                                                    $33, ->12
   30    43    >   ECHO                                                     !4
   31    44      > RETURN                                                   !3
   32    45*     > RETURN                                                   null

End of function pram_alter

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
144.27 ms | 1403 KiB | 16 Q