3v4l.org

run code in 300+ PHP versions simultaneously
<? function where($column, $param, $operator = '=') { if (isset($column) && strlen($operator) > 0) { if ($operator === '>') { $_where = ' WHERE ' . $column . '>?'; } else if ($operator == '<') { $_where = ' WHERE ' . $column . '<?'; } else if ($operator === '=') { $_where = ' WHERE ' . $column . '=?'; } else { $this->_where = ' WHERE ' . $column . $operator . '?'; } //$_where = ' WHERE ' . $column . chr(0x3c) . '?'; echo "\n" . $_where . "\n"; } else { throw new \Exception('We need to have $column variable like string and $param like Param!', 500); } echo "\n"; } where('id', 13332, "<");
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/vCO5Z
function name:  (null)
number of ops:  6
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   22     0  E >   INIT_FCALL                                               'where'
          1        SEND_VAL                                                 'id'
          2        SEND_VAL                                                 13332
          3        SEND_VAL                                                 '%3C'
          4        DO_FCALL                                      0          
          5      > RETURN                                                   1

Function where:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 46) Position 1 = 5, Position 2 = 8
Branch analysis from position: 5
2 jumps found. (Code = 43) Position 1 = 9, Position 2 = 37
Branch analysis from position: 9
2 jumps found. (Code = 43) Position 1 = 11, Position 2 = 15
Branch analysis from position: 11
1 jumps found. (Code = 42) Position 1 = 33
Branch analysis from position: 33
1 jumps found. (Code = 42) Position 1 = 42
Branch analysis from position: 42
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 15
2 jumps found. (Code = 43) Position 1 = 17, Position 2 = 21
Branch analysis from position: 17
1 jumps found. (Code = 42) Position 1 = 33
Branch analysis from position: 33
Branch analysis from position: 21
2 jumps found. (Code = 43) Position 1 = 23, Position 2 = 27
Branch analysis from position: 23
1 jumps found. (Code = 42) Position 1 = 33
Branch analysis from position: 33
Branch analysis from position: 27
1 jumps found. (Code = 42) Position 1 = 42
Branch analysis from position: 42
Branch analysis from position: 37
1 jumps found. (Code = 108) Position 1 = -2
Branch analysis from position: 8
filename:       /in/vCO5Z
function name:  where
number of ops:  44
compiled vars:  !0 = $column, !1 = $param, !2 = $operator, !3 = $_where
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2        RECV_INIT                                        !2      '%3D'
    4     3        ISSET_ISEMPTY_CV                                 ~4      !0
          4      > JMPZ_EX                                          ~4      ~4, ->8
          5    >   STRLEN                                           ~5      !2
          6        IS_SMALLER                                       ~6      0, ~5
          7        BOOL                                             ~4      ~6
          8    > > JMPZ                                                     ~4, ->37
    5     9    >   IS_IDENTICAL                                             !2, '%3E'
         10      > JMPZ                                                     ~7, ->15
    6    11    >   CONCAT                                           ~8      '+WHERE+', !0
         12        CONCAT                                           ~9      ~8, '%3E%3F'
         13        ASSIGN                                                   !3, ~9
         14      > JMP                                                      ->33
    7    15    >   IS_EQUAL                                                 !2, '%3C'
         16      > JMPZ                                                     ~11, ->21
    8    17    >   CONCAT                                           ~12     '+WHERE+', !0
         18        CONCAT                                           ~13     ~12, '%3C%3F'
         19        ASSIGN                                                   !3, ~13
         20      > JMP                                                      ->33
    9    21    >   IS_IDENTICAL                                             !2, '%3D'
         22      > JMPZ                                                     ~15, ->27
   10    23    >   CONCAT                                           ~16     '+WHERE+', !0
         24        CONCAT                                           ~17     ~16, '%3D%3F'
         25        ASSIGN                                                   !3, ~17
         26      > JMP                                                      ->33
   12    27    >   FETCH_THIS                                       $19     
         28        CONCAT                                           ~21     '+WHERE+', !0
         29        CONCAT                                           ~22     ~21, !2
         30        CONCAT                                           ~23     ~22, '%3F'
         31        ASSIGN_OBJ                                               $19, '_where'
         32        OP_DATA                                                  ~23
   15    33    >   CONCAT                                           ~24     '%0A', !3
         34        CONCAT                                           ~25     ~24, '%0A'
         35        ECHO                                                     ~25
         36      > JMP                                                      ->42
   17    37    >   NEW                                              $26     'Exception'
         38        SEND_VAL_EX                                              'We+need+to+have+%24column+variable+like+string+and+%24param+like+Param%21'
         39        SEND_VAL_EX                                              500
         40        DO_FCALL                                      0          
         41      > THROW                                         0          $26
   19    42    >   ECHO                                                     '%0A'
   20    43      > RETURN                                                   null

End of function where

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
171.44 ms | 1403 KiB | 14 Q