3v4l.org

run code in 300+ PHP versions simultaneously
<?php $products = [1,2,3]; $placeholders = trim(str_repeat('?,', count($products)), ','); var_dump($placeholders);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/eBePH
function name:  (null)
number of ops:  15
compiled vars:  !0 = $products, !1 = $placeholders
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    4     1        INIT_FCALL                                               'trim'
          2        INIT_FCALL                                               'str_repeat'
          3        SEND_VAL                                                 '%3F%2C'
          4        COUNT                                            ~3      !0
          5        SEND_VAL                                                 ~3
          6        DO_ICALL                                         $4      
          7        SEND_VAR                                                 $4
          8        SEND_VAL                                                 '%2C'
          9        DO_ICALL                                         $5      
         10        ASSIGN                                                   !1, $5
    6    11        INIT_FCALL                                               'var_dump'
         12        SEND_VAR                                                 !1
         13        DO_ICALL                                                 
         14      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
157.49 ms | 1394 KiB | 19 Q