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; echo "<td>help me </td>"; ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Kii0M
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>
   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        ECHO                                                     '%3Ctd%3Ehelp+me+%3C%2Ftd%3E'
   32     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 = 11
Branch analysis from position: 43
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 11
2 jumps found. (Code = 43) Position 1 = 14, Position 2 = 22
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 = 11
Branch analysis from position: 43
Branch analysis from position: 11
Branch analysis from position: 22
2 jumps found. (Code = 44) Position 1 = 43, Position 2 = 11
Branch analysis from position: 43
Branch analysis from position: 11
filename:       /in/Kii0M
function name:  pram_alter
number of ops:  45
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                                                      ->35
   15    11    >   SUB                                              ~16     !3, 1
         12        IS_SMALLER                                               !5, ~16
         13      > JMPZ                                                     ~17, ->22
   16    14    >   ROPE_INIT                                     5  ~19     '%40'
         15        ROPE_ADD                                      1  ~19     ~19, !6
         16        ROPE_ADD                                      2  ~19     ~19, '+%3D+'
         17        ROPE_ADD                                      3  ~19     ~19, !7
         18        ROPE_END                                      4  ~18     ~19, '%2C+'
         19        CONCAT                                           ~22     !1, ~18
         20        ASSIGN                                                   !1, ~22
         21      > JMP                                                      ->29
   20    22    >   ROPE_INIT                                     5  ~25     '%40'
         23        ROPE_ADD                                      1  ~25     ~25, !6
         24        ROPE_ADD                                      2  ~25     ~25, '+%3D'
         25        ROPE_ADD                                      3  ~25     ~25, !7
         26        ROPE_END                                      4  ~24     ~25, '%3B%22+'
         27        CONCAT                                           ~28     !1, ~24
         28        ASSIGN                                                   !1, ~28
   22    29    >   ASSIGN                                                   !8, 'myProc'
   23    30        CONCAT                                           ~31     '%22exec+', !8
         31        CONCAT                                           ~32     ~31, '+'
         32        CONCAT                                           ~33     ~32, !1
         33        ASSIGN                                                   !2, ~33
   24    34        PRE_INC                                                  !5
   13    35    >   INIT_FCALL_BY_NAME                                       'each'
         36        SEND_VAR_EX                                              !0
         37        DO_FCALL                                      0  $36     
         38        FETCH_LIST_R                                     $37     $36, 0
         39        ASSIGN                                                   !6, $37
         40        FETCH_LIST_R                                     $39     $36, 1
         41        ASSIGN                                                   !7, $39
         42      > JMPNZ                                                    $36, ->11
   26    43    > > RETURN                                                   !2
   27    44*     > RETURN                                                   null

End of function pram_alter

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
158.3 ms | 1403 KiB | 19 Q