3v4l.org

run code in 300+ PHP versions simultaneously
<?php function dangerous() { echo 'Dangerous code executed'; } $arg = '42a{${dangerous()}}'; preg_replace("/([0-9]+)([a-z]+)/e",'list($var, $var2) = array("$1", "$2")', $arg); var_dump($var, $var2);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/mlm2G
function name:  (null)
number of ops:  11
compiled vars:  !0 = $arg, !1 = $var, !2 = $var2
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   ASSIGN                                                   !0, '42a%7B%24%7Bdangerous%28%29%7D%7D'
    9     1        INIT_FCALL                                               'preg_replace'
          2        SEND_VAL                                                 '%2F%28%5B0-9%5D%2B%29%28%5Ba-z%5D%2B%29%2Fe'
          3        SEND_VAL                                                 'list%28%24var%2C+%24var2%29+%3D+array%28%22%241%22%2C+%22%242%22%29'
          4        SEND_VAR                                                 !0
          5        DO_ICALL                                                 
   10     6        INIT_FCALL                                               'var_dump'
          7        SEND_VAR                                                 !1
          8        SEND_VAR                                                 !2
          9        DO_ICALL                                                 
         10      > RETURN                                                   1

Function dangerous:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/mlm2G
function name:  dangerous
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   ECHO                                                     'Dangerous+code+executed'
    6     1      > RETURN                                                   null

End of function dangerous

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
153.39 ms | 1394 KiB | 17 Q