3v4l.org

run code in 500+ PHP versions simultaneously
<?php $data = 'Some {abc} here'; $abc = "Word"; echo preg_replace_callback('/\{(.*?)\}/', function ($matches) { return $GLOBALS[$matches[1]]; }, $data);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/pRudu
function name:  (null)
number of ops:  10
compiled vars:  !0 = $data, !1 = $abc
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                       !0, 'Some+%7Babc%7D+here'
    4     1        ASSIGN                                                       !1, 'Word'
    5     2        INIT_FCALL                                                   'preg_replace_callback'
          3        SEND_VAL                                                     '%2F%5C%7B%28.%2A%3F%29%5C%7D%2F'
          4        DECLARE_LAMBDA_FUNCTION                              ~4      [0]
    7     5        SEND_VAL                                                     ~4
          6        SEND_VAR                                                     !0
    5     7        DO_ICALL                                             $5      
    7     8        ECHO                                                         $5
          9      > 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/pRudu
function name:  {closure:/in/pRudu:5}
number of ops:  5
compiled vars:  !0 = $matches
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    5     0  E >   RECV                                                 !0      
    6     1        FETCH_DIM_R                                          ~1      !0, 1
          2        FETCH_R                          global              ~2      ~1
          3      > RETURN                                                       ~2
    7     4*     > RETURN                                                       null

End of Dynamic Function 0

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
171.93 ms | 1992 KiB | 14 Q