3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = array(1,2); $test = '{{$the}}'; $the = 'var'; $theVar = preg_match('/({{\$(.*)}})/',$test,$matches); var_dump($matches[2]); var_dump(${$matches[2]});
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ndCmD
function name:  (null)
number of ops:  19
compiled vars:  !0 = $a, !1 = $test, !2 = $the, !3 = $theVar, !4 = $matches
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%5C%24%28.%2A%29%7D%7D%29%2F'
          5        SEND_VAR                                                 !1
          6        SEND_REF                                                 !4
          7        DO_ICALL                                         $8      
          8        ASSIGN                                                   !3, $8
    7     9        INIT_FCALL                                               'var_dump'
         10        FETCH_DIM_R                                      ~10     !4, 2
         11        SEND_VAL                                                 ~10
         12        DO_ICALL                                                 
    8    13        INIT_FCALL                                               'var_dump'
         14        FETCH_DIM_R                                      ~12     !4, 2
         15        FETCH_R                      local               ~13     ~12
         16        SEND_VAL                                                 ~13
         17        DO_ICALL                                                 
         18      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
186.44 ms | 940 KiB | 18 Q