3v4l.org

run code in 500+ PHP versions simultaneously
<?php function escape_sql_regexp( $str ) { return preg_replace('/[+*?[\\^\\]$(){}=!|:,]/', '\\\\\\\\${0}', $str); } echo escape_sql_regexp( '(541) 754-3010' );
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/r8pAS
function name:  (null)
number of ops:  5
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    7     0  E >   INIT_FCALL                                                   'escape_sql_regexp'
          1        SEND_VAL                                                     '%28541%29+754-3010'
          2        DO_FCALL                                          0  $0      
          3        ECHO                                                         $0
          4      > RETURN                                                       1

Function escape_sql_regexp:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/r8pAS
function name:  escape_sql_regexp
number of ops:  5
compiled vars:  !0 = $str
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   RECV                                                 !0      
    4     1        FRAMELESS_ICALL_3                preg_replace        ~1      '%2F%5B%2B%2A%3F%5B%5C%5E%5C%5D%24%28%29%7B%7D%3D%21%7C%3A%2C%5D%2F', '%5C%5C%5C%5C%24%7B0%7D'
          2        OP_DATA                                                      !0
          3      > RETURN                                                       ~1
    5     4*     > RETURN                                                       null

End of function escape_sql_regexp

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
182.59 ms | 3286 KiB | 14 Q