3v4l.org

run code in 300+ PHP versions simultaneously
<?php function splat($s, ...$vars){ echo '$stmt->bind_param("' . $s . '", '.$vars; } $array = ['a', 'b', 'c']; $s = ''; for ($x = 0; $x < count($array); $x ++) { $s .= 's'; } splat($s, ...$array);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 6
Branch analysis from position: 6
2 jumps found. (Code = 44) Position 1 = 9, Position 2 = 4
Branch analysis from position: 9
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 4
2 jumps found. (Code = 44) Position 1 = 9, Position 2 = 4
Branch analysis from position: 9
Branch analysis from position: 4
filename:       /in/Zm5Ak
function name:  (null)
number of ops:  15
compiled vars:  !0 = $array, !1 = $s, !2 = $x
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   ASSIGN                                                   !0, <array>
    8     1        ASSIGN                                                   !1, ''
    9     2        ASSIGN                                                   !2, 0
          3      > JMP                                                      ->6
   10     4    >   ASSIGN_OP                                     8          !1, 's'
    9     5        PRE_INC                                                  !2
          6    >   COUNT                                            ~8      !0
          7        IS_SMALLER                                               !2, ~8
          8      > JMPNZ                                                    ~9, ->4
   13     9    >   INIT_FCALL                                               'splat'
         10        SEND_VAR                                                 !1
         11        SEND_UNPACK                                              !0
         12        CHECK_UNDEF_ARGS                                         
         13        DO_FCALL                                      1          
         14      > RETURN                                                   1

Function splat:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Zm5Ak
function name:  splat
number of ops:  7
compiled vars:  !0 = $s, !1 = $vars
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
          1        RECV_VARIADIC                                    !1      
    4     2        CONCAT                                           ~2      '%24stmt-%3Ebind_param%28%22', !0
          3        CONCAT                                           ~3      ~2, '%22%2C+'
          4        CONCAT                                           ~4      ~3, !1
          5        ECHO                                                     ~4
    5     6      > RETURN                                                   null

End of function splat

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
164.99 ms | 1398 KiB | 14 Q