3v4l.org

run code in 300+ PHP versions simultaneously
<?php $template = "select emp.* from employee emp" . " join departments dep on emp.id_department = dep.id" . " @{where}" . " @{order}" . " limit :limit offset :offset"; echo $template; $pattern = '/[^\\$]\\@\\{(\\w+)\\}/'; preg_match_all($pattern, $template, $matches); var_dump($matches);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ZXGeQ
function name:  (null)
number of ops:  12
compiled vars:  !0 = $template, !1 = $pattern, !2 = $matches
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'select+emp.%2A+from+employee+emp+join+departments+dep+on+emp.id_department+%3D+dep.id+%40%7Bwhere%7D+%40%7Border%7D+limit+%3Alimit+offset+%3Aoffset'
    9     1        ECHO                                                     !0
   10     2        ASSIGN                                                   !1, '%2F%5B%5E%5C%24%5D%5C%40%5C%7B%28%5Cw%2B%29%5C%7D%2F'
   11     3        INIT_FCALL                                               'preg_match_all'
          4        SEND_VAR                                                 !1
          5        SEND_VAR                                                 !0
          6        SEND_REF                                                 !2
          7        DO_ICALL                                                 
   12     8        INIT_FCALL                                               'var_dump'
          9        SEND_VAR                                                 !2
         10        DO_ICALL                                                 
         11      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
157.89 ms | 1394 KiB | 17 Q