3v4l.org

run code in 300+ PHP versions simultaneously
<?php $variableName = 'MyVariable'; // Create new variable with the name defined in variable $variableName $stack_escrow_balance = 100; $type = 'escrow'; $varstring = '$stack_'.$type.'_balance'; var_dump(${$varstring});
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/GXNI2
function name:  (null)
number of ops:  11
compiled vars:  !0 = $variableName, !1 = $stack_escrow_balance, !2 = $type, !3 = $varstring
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 'MyVariable'
    4     1        ASSIGN                                                   !1, 100
    5     2        ASSIGN                                                   !2, 'escrow'
    6     3        CONCAT                                           ~7      '%24stack_', !2
          4        CONCAT                                           ~8      ~7, '_balance'
          5        ASSIGN                                                   !3, ~8
    7     6        INIT_FCALL                                               'var_dump'
          7        FETCH_R                      local               ~10     !3
          8        SEND_VAL                                                 ~10
          9        DO_ICALL                                                 
         10      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
171.09 ms | 1394 KiB | 15 Q