3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string_foo = 'foo'; $string_bar = 'bar'; $var = 'foo'; var_dump(${'string_' . $var}); $var = 'bar'; var_dump(${'string_' . $var});
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/YXuG4
function name:  (null)
number of ops:  15
compiled vars:  !0 = $string_foo, !1 = $string_bar, !2 = $var
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'foo'
    4     1        ASSIGN                                                   !1, 'bar'
    6     2        ASSIGN                                                   !2, 'foo'
    7     3        INIT_FCALL                                               'var_dump'
          4        CONCAT                                           ~6      'string_', !2
          5        FETCH_R                      local               ~7      ~6
          6        SEND_VAL                                                 ~7
          7        DO_ICALL                                                 
    9     8        ASSIGN                                                   !2, 'bar'
   10     9        INIT_FCALL                                               'var_dump'
         10        CONCAT                                           ~10     'string_', !2
         11        FETCH_R                      local               ~11     ~10
         12        SEND_VAL                                                 ~11
         13        DO_ICALL                                                 
         14      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
142.92 ms | 1394 KiB | 15 Q