3v4l.org

run code in 300+ PHP versions simultaneously
<?php /** * @link https://stackoverflow.com/a/8314506/367456 */ $content = '\tThis variable is not set by me.\nCannot do anything about it.\n'; echo "input:\n======\n", $content, "\n\n", "output:\n=======\n", preg_replace_callback( '/\\\\([nrtvf\\\\$"]|[0-7]{1,3}|\x[0-9A-Fa-f]{1,2})/', fn($matches) => stripcslashes($matches[0]), $content ) ;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/tejgO
function name:  (null)
number of ops:  13
compiled vars:  !0 = $content
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   ASSIGN                                                   !0, '%5CtThis+variable+is+not+set+by+me.%5CnCannot+do+anything+about+it.%5Cn'
   11     1        ECHO                                                     'input%3A%0A%3D%3D%3D%3D%3D%3D%0A'
   13     2        ECHO                                                     !0
   15     3        ECHO                                                     '%0A%0A'
   17     4        ECHO                                                     'output%3A%0A%3D%3D%3D%3D%3D%3D%3D%0A'
   19     5        INIT_FCALL                                               'preg_replace_callback'
   20     6        SEND_VAL                                                 '%2F%5C%5C%28%5Bnrtvf%5C%5C%24%22%5D%7C%5B0-7%5D%7B1%2C3%7D%7C%5Cx%5B0-9A-Fa-f%5D%7B1%2C2%7D%29%2F'
   21     7        DECLARE_LAMBDA_FUNCTION                          ~2      [0]
          8        SEND_VAL                                                 ~2
          9        SEND_VAR                                                 !0
   19    10        DO_ICALL                                         $3      
   21    11        ECHO                                                     $3
   24    12      > RETURN                                                   1


Dynamic Functions:
Dynamic Function 0
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/tejgO
function name:  {closure}
number of ops:  7
compiled vars:  !0 = $matches
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   21     0  E >   RECV                                             !0      
          1        INIT_FCALL                                               'stripcslashes'
          2        FETCH_DIM_R                                      ~1      !0, 0
          3        SEND_VAL                                                 ~1
          4        DO_ICALL                                         $2      
          5      > RETURN                                                   $2
          6*     > RETURN                                                   null

End of Dynamic Function 0

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
148.11 ms | 1003 KiB | 15 Q