3v4l.org

run code in 300+ PHP versions simultaneously
<?php function escapeString($string) { return preg_replace('/([\,;])/','\\\$1', $string); } echo escapeString('testing, to');
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/7gIaV
function name:  (null)
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   INIT_FCALL                                               'escapestring'
          1        SEND_VAL                                                 'testing%2C+to'
          2        DO_FCALL                                      0  $0      
          3        ECHO                                                     $0
          4      > RETURN                                                   1

Function escapestring:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/7gIaV
function name:  escapeString
number of ops:  8
compiled vars:  !0 = $string
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   RECV                                             !0      
    3     1        INIT_FCALL                                               'preg_replace'
          2        SEND_VAL                                                 '%2F%28%5B%5C%2C%3B%5D%29%2F'
          3        SEND_VAL                                                 '%5C%5C%241'
          4        SEND_VAR                                                 !0
          5        DO_ICALL                                         $1      
          6      > RETURN                                                   $1
    4     7*     > RETURN                                                   null

End of function escapestring

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
149.52 ms | 1396 KiB | 16 Q