3v4l.org

run code in 300+ PHP versions simultaneously
<?php $replace = "I'm here"; $str = "xy matches xy"; echo preg_replace_callback("/matches/", create_function('$matches', 'return "'.$replace.'";'), $str);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/hWtj6
function name:  (null)
number of ops:  15
compiled vars:  !0 = $replace, !1 = $str
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 'I%27m+here'
    3     1        ASSIGN                                                   !1, 'xy+matches+xy'
    4     2        INIT_FCALL                                               'preg_replace_callback'
          3        SEND_VAL                                                 '%2Fmatches%2F'
          4        INIT_FCALL_BY_NAME                                       'create_function'
          5        SEND_VAL_EX                                              '%24matches'
          6        CONCAT                                           ~4      'return+%22', !0
          7        CONCAT                                           ~5      ~4, '%22%3B'
          8        SEND_VAL_EX                                              ~5
          9        DO_FCALL                                      0  $6      
         10        SEND_VAR                                                 $6
         11        SEND_VAR                                                 !1
         12        DO_ICALL                                         $7      
         13        ECHO                                                     $7
         14      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
161.31 ms | 1394 KiB | 18 Q