3v4l.org

run code in 500+ PHP versions simultaneously
<?php $related = array(1,2,3); $sql = "SELECT id,title,pic1 FROM tbl_products WHERE id IN ("; $sql .= trim(str_repeat("?,",count($related)),","); $sql .= ") LIMIT 3;"; echo $sql;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/qot2k
function name:  (null)
number of ops:  12
compiled vars:  !0 = $related, !1 = $sql
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                       !0, <array>
    4     1        ASSIGN                                                       !1, 'SELECT+id%2Ctitle%2Cpic1+FROM+tbl_products+WHERE+id+IN+%28'
    6     2        INIT_FCALL                                                   'str_repeat'
          3        SEND_VAL                                                     '%3F%2C'
          4        COUNT                                                ~4      !0
          5        SEND_VAL                                                     ~4
          6        DO_ICALL                                             $5      
          7        FRAMELESS_ICALL_2                trim                ~6      $5, '%2C'
          8        ASSIGN_OP                                         8          !1, ~6
    8     9        ASSIGN_OP                                         8          !1, '%29+LIMIT+3%3B'
   11    10        ECHO                                                         !1
         11      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
168.02 ms | 2247 KiB | 14 Q