3v4l.org

run code in 300+ PHP versions simultaneously
<?php function test() {echo "THIS SHOULD NOT BE SEEN!!\n";} function ryat($a) {var_dump($a);} $str = "', test(), '"; echo "\npreg_replace()\n"; //var_dump(preg_replace('/^(.*)$/e', "ryat('\\1')", $str)); var_dump(preg_replace_callback('/^(.*)$/e', "ryat", $str));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/iMqei
function name:  (null)
number of ops:  11
compiled vars:  !0 = $str
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   ASSIGN                                                   !0, '%27%2C+test%28%29%2C+%27'
    8     1        ECHO                                                     '%0Apreg_replace%28%29%0A'
   10     2        INIT_FCALL                                               'var_dump'
          3        INIT_FCALL                                               'preg_replace_callback'
          4        SEND_VAL                                                 '%2F%5E%28.%2A%29%24%2Fe'
          5        SEND_VAL                                                 'ryat'
          6        SEND_VAR                                                 !0
          7        DO_ICALL                                         $2      
          8        SEND_VAR                                                 $2
          9        DO_ICALL                                                 
         10      > RETURN                                                   1

Function test:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/iMqei
function name:  test
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ECHO                                                     'THIS+SHOULD+NOT+BE+SEEN%21%21%0A'
          1      > RETURN                                                   null

End of function test

Function ryat:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/iMqei
function name:  ryat
number of ops:  5
compiled vars:  !0 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   RECV                                             !0      
          1        INIT_FCALL                                               'var_dump'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                                 
          4      > RETURN                                                   null

End of function ryat

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
156.99 ms | 1395 KiB | 17 Q