3v4l.org

run code in 300+ PHP versions simultaneously
<?php function clean_link($a, $b) { return "change"; } function run($str) { $eval_links = '$link = clean_link("$1","$2")'; echo preg_replace('{test}ei',"$eval_links",$str); } run('test');
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/P4mPQ
function name:  (null)
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E >   INIT_FCALL                                               'run'
          1        SEND_VAL                                                 'test'
          2        DO_FCALL                                      0          
          3      > RETURN                                                   1

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

End of function clean_link

Function run:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/P4mPQ
function name:  run
number of ops:  10
compiled vars:  !0 = $str, !1 = $eval_links
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   RECV                                             !0      
   10     1        ASSIGN                                                   !1, '%24link+%3D+clean_link%28%22%241%22%2C%22%242%22%29'
   12     2        INIT_FCALL                                               'preg_replace'
          3        SEND_VAL                                                 '%7Btest%7Dei'
          4        CAST                                          6  ~3      !1
          5        SEND_VAL                                                 ~3
          6        SEND_VAR                                                 !0
          7        DO_ICALL                                         $4      
          8        ECHO                                                     $4
   13     9      > RETURN                                                   null

End of function run

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
145.39 ms | 1090 KiB | 15 Q