3v4l.org

run code in 300+ PHP versions simultaneously
<?php $re = '/([$][a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*+)/m'; $str = '"SELECT * FROM table WHERE admin=\'".$admin."\' AND id=".$idclient." AND something=".$something;'; $subst = 'functionname($1)'; $result = preg_replace($re, $subst, $str); echo $result;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/DXuMr
function name:  (null)
number of ops:  11
compiled vars:  !0 = $re, !1 = $str, !2 = $subst, !3 = $result
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '%2F%28%5B%24%5D%5Ba-zA-Z_%5Cx7f-%5Cxff%5D%5Ba-zA-Z0-9_%5Cx7f-%5Cxff%5D%2A%2B%29%2Fm'
    4     1        ASSIGN                                                   !1, '%22SELECT+%2A+FROM+table+WHERE+admin%3D%27%22.%24admin.%22%27+AND+id%3D%22.%24idclient.%22+AND+something%3D%22.%24something%3B'
    5     2        ASSIGN                                                   !2, 'functionname%28%241%29'
    7     3        INIT_FCALL                                               'preg_replace'
          4        SEND_VAR                                                 !0
          5        SEND_VAR                                                 !2
          6        SEND_VAR                                                 !1
          7        DO_ICALL                                         $7      
          8        ASSIGN                                                   !3, $7
    9     9        ECHO                                                     !3
   10    10      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
141.89 ms | 1398 KiB | 15 Q