3v4l.org

run code in 300+ PHP versions simultaneously
<?php sqlTemplate("{{1}} {[2]} {{3: BLABLABLA}}",array()); function sqlTemplate($query,$vars){ $replace = function($matches) use ($vars) { var_dump($matches,$vars); }; return preg_replace_callback('~\{([\[\{]\})[a-z0-9\_\-]+(\:([^}]))?[\]\}]\}~i',$replace, $query); }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/N1PDa
function name:  (null)
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL_BY_NAME                                       'sqlTemplate'
          1        SEND_VAL_EX                                              '%7B%7B1%7D%7D+%7B%5B2%5D%7D+%7B%7B3%3A+BLABLABLA%7D%7D'
          2        SEND_VAL_EX                                              <array>
          3        DO_FCALL                                      0          
   10     4      > RETURN                                                   1

Function sqltemplate:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/N1PDa
function name:  sqlTemplate
number of ops:  12
compiled vars:  !0 = $query, !1 = $vars, !2 = $replace
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   RECV                                             !0      
          1        RECV                                             !1      
    6     2        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FN1PDa%3A6%240'
          3        BIND_LEXICAL                                             ~3, !1
          4        ASSIGN                                                   !2, ~3
    9     5        INIT_FCALL                                               'preg_replace_callback'
          6        SEND_VAL                                                 '%7E%5C%7B%28%5B%5C%5B%5C%7B%5D%5C%7D%29%5Ba-z0-9%5C_%5C-%5D%2B%28%5C%3A%28%5B%5E%7D%5D%29%29%3F%5B%5C%5D%5C%7D%5D%5C%7D%7Ei'
          7        SEND_VAR                                                 !2
          8        SEND_VAR                                                 !0
          9        DO_ICALL                                         $5      
         10      > RETURN                                                   $5
   10    11*     > RETURN                                                   null

End of function sqltemplate

Function %00%7Bclosure%7D%2Fin%2FN1PDa%3A6%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/N1PDa
function name:  {closure}
number of ops:  7
compiled vars:  !0 = $matches, !1 = $vars
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   RECV                                             !0      
          1        BIND_STATIC                                              !1
    7     2        INIT_FCALL                                               'var_dump'
          3        SEND_VAR                                                 !0
          4        SEND_VAR                                                 !1
          5        DO_ICALL                                                 
    8     6      > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FN1PDa%3A6%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
168.78 ms | 941 KiB | 18 Q