3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = array(1,2); $test = '{{$the}}'; $the = 'var'; $theVar = preg_match('/({{(.*)}})/', '$2', $test); echo ${theVar};
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/HeUav
function name:  (null)
number of ops:  13
compiled vars:  !0 = $a, !1 = $test, !2 = $the, !3 = $theVar
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
    3     1        ASSIGN                                                   !1, '%7B%7B%24the%7D%7D'
    4     2        ASSIGN                                                   !2, 'var'
    6     3        INIT_FCALL                                               'preg_match'
          4        SEND_VAL                                                 '%2F%28%7B%7B%28.%2A%29%7D%7D%29%2F'
          5        SEND_VAL                                                 '%242'
          6        SEND_REF                                                 !1
          7        DO_ICALL                                         $7      
          8        ASSIGN                                                   !3, $7
    7     9        FETCH_CONSTANT                                   ~9      'theVar'
         10        FETCH_R                      local               ~10     ~9
         11        ECHO                                                     ~10
         12      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
168.84 ms | 1385 KiB | 15 Q