3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = "hello"; $b = "hi"; $val = "a"; echo $$val; // outputs "hello" echo "\n"; function wer(){ $val = "b"; echo $$val; // outputs "hi" } wer();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Dl6eA
function name:  (null)
number of ops:  9
compiled vars:  !0 = $a, !1 = $b, !2 = $val
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 'hello'
    3     1        ASSIGN                                                   !1, 'hi'
    5     2        ASSIGN                                                   !2, 'a'
    6     3        FETCH_R                      local               ~6      !2
          4        ECHO                                                     ~6
    8     5        ECHO                                                     '%0A'
   14     6        INIT_FCALL                                               'wer'
          7        DO_FCALL                                      0          
          8      > RETURN                                                   1

Function wer:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Dl6eA
function name:  wer
number of ops:  4
compiled vars:  !0 = $val
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   ASSIGN                                                   !0, 'b'
   11     1        FETCH_R                      local               ~2      !0
          2        ECHO                                                     ~2
   13     3      > RETURN                                                   null

End of function wer

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
153.74 ms | 1397 KiB | 14 Q