3v4l.org

run code in 300+ PHP versions simultaneously
<?php $vars = array( 'headline' => 'foo' ); echo preg_replace_callback('/\{\{(\w+)\}\}/', function (array $m) use ($vars) { return $vars[$m[1]]; }, '<p>{{headline}}</p>');
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/WjXjm
function name:  (null)
number of ops:  10
compiled vars:  !0 = $vars
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    7     1        INIT_FCALL                                               'preg_replace_callback'
          2        SEND_VAL                                                 '%2F%5C%7B%5C%7B%28%5Cw%2B%29%5C%7D%5C%7D%2F'
          3        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FWjXjm%3A7%240'
          4        BIND_LEXICAL                                             ~2, !0
    9     5        SEND_VAL                                                 ~2
          6        SEND_VAL                                                 '%3Cp%3E%7B%7Bheadline%7D%7D%3C%2Fp%3E'
          7        DO_ICALL                                         $3      
          8        ECHO                                                     $3
          9      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2FWjXjm%3A7%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/WjXjm
function name:  {closure}
number of ops:  6
compiled vars:  !0 = $m, !1 = $vars
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   RECV                                             !0      
          1        BIND_STATIC                                              !1
    8     2        FETCH_DIM_R                                      ~2      !0, 1
          3        FETCH_DIM_R                                      ~3      !1, ~2
          4      > RETURN                                                   ~3
    9     5*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FWjXjm%3A7%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
163.9 ms | 1395 KiB | 15 Q