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; $bound = count($array); while (list($key, $val) = each($array)) { //echo "$key => $val"; $pStr=$pStr."$key ='" . $val . "',"; $strproc='myProc'; $sqlStatment="exec " . $strproc . " " . $pStr; } $sqlStatment =$sqlStatment. $endSqlStatement; $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/TqfI4
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>
   23     1        INIT_FCALL                                               'pram_alter'
          2        SEND_VAR                                                 !0
          3        SEND_VAL                                                 'pram_alter'
          4        DO_FCALL                                      0  $3      
          5        ASSIGN                                                   !1, $3
   24     6        ECHO                                                     !1
   25     7      > RETURN                                                   1

Function pram_alter:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 20
Branch analysis from position: 20
2 jumps found. (Code = 44) Position 1 = 28, Position 2 = 9
Branch analysis from position: 28
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 9
2 jumps found. (Code = 44) Position 1 = 28, Position 2 = 9
Branch analysis from position: 28
Branch analysis from position: 9
filename:       /in/TqfI4
function name:  pram_alter
number of ops:  34
compiled vars:  !0 = $array, !1 = $key, !2 = $pStr, !3 = $bound, !4 = $val, !5 = $strproc, !6 = $sqlStatment, !7 = $endSqlStatement
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        COUNT                                            ~10     !0
          7        ASSIGN                                                   !3, ~10
   10     8      > JMP                                                      ->20
   13     9    >   NOP                                                      
         10        FAST_CONCAT                                      ~12     !1, '+%3D%27'
         11        CONCAT                                           ~13     !2, ~12
         12        CONCAT                                           ~14     ~13, !4
         13        CONCAT                                           ~15     ~14, '%27%2C'
         14        ASSIGN                                                   !2, ~15
   14    15        ASSIGN                                                   !5, 'myProc'
   15    16        CONCAT                                           ~18     'exec+', !5
         17        CONCAT                                           ~19     ~18, '+'
         18        CONCAT                                           ~20     ~19, !2
         19        ASSIGN                                                   !6, ~20
   10    20    >   INIT_FCALL_BY_NAME                                       'each'
         21        SEND_VAR_EX                                              !0
         22        DO_FCALL                                      0  $22     
         23        FETCH_LIST_R                                     $23     $22, 0
         24        ASSIGN                                                   !1, $23
         25        FETCH_LIST_R                                     $25     $22, 1
         26        ASSIGN                                                   !4, $25
         27      > JMPNZ                                                    $22, ->9
   17    28    >   CONCAT                                           ~27     !6, !7
         29        ASSIGN                                                   !6, ~27
   18    30        ASSIGN                                                   !7, '%3B'
   19    31        ECHO                                                     !3
   20    32      > RETURN                                                   !6
   21    33*     > RETURN                                                   null

End of function pram_alter

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
153.66 ms | 1403 KiB | 16 Q