3v4l.org

run code in 500+ PHP versions simultaneously
<?php $where = [["id", ">", 3], ["firstname", "=", "John"]]; $wherequery = ' where '; foreach($where as $w){ $wherequery .= $w[0] . ' ' . $w[1] . ' ? '; $params[] = $w[2]; } echo "SELECT columns FROM table " . $wherequery;
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 3, Position 2 = 14
Branch analysis from position: 3
2 jumps found. (Code = 78) Position 1 = 4, Position 2 = 14
Branch analysis from position: 4
1 jumps found. (Code = 42) Position 1 = 3
Branch analysis from position: 3
Branch analysis from position: 14
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 14
filename:       /in/k8F2Y
function name:  (null)
number of ops:  18
compiled vars:  !0 = $where, !1 = $wherequery, !2 = $w, !3 = $params
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                       !0, <array>
    3     1        ASSIGN                                                       !1, '+where+'
    4     2      > FE_RESET_R                                           $6      !0, ->14
          3    > > FE_FETCH_R                                                   $6, !2, ->14
    5     4    >   FETCH_DIM_R                                          ~7      !2, 0
          5        CONCAT                                               ~8      ~7, '+'
          6        FETCH_DIM_R                                          ~9      !2, 1
          7        CONCAT                                               ~10     ~8, ~9
          8        CONCAT                                               ~11     ~10, '+%3F+'
          9        ASSIGN_OP                                         8          !1, ~11
    6    10        FETCH_DIM_R                                          ~14     !2, 2
         11        ASSIGN_DIM                                                   !3
         12        OP_DATA                                                      ~14
    4    13      > JMP                                                          ->3
         14    >   FE_FREE                                                      $6
    8    15        CONCAT                                               ~15     'SELECT+columns+FROM+table+', !1
         16        ECHO                                                         ~15
    9    17      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
166.28 ms | 1883 KiB | 13 Q