3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { public function bar() { $name = 'this'; var_dump($$name); $$name = 'herpderp'; var_dump($$name); var_dump($this); } } $d = new Foo; $d->bar();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/LKD5C
function name:  (null)
number of ops:  6
compiled vars:  !0 = $d
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   NEW                                              $1      'Foo'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   14     3        INIT_METHOD_CALL                                         !0, 'bar'
          4        DO_FCALL                                      0          
          5      > RETURN                                                   1

Class Foo:
Function bar:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/LKD5C
function name:  bar
number of ops:  16
compiled vars:  !0 = $name
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   ASSIGN                                                   !0, 'this'
    6     1        INIT_FCALL                                               'var_dump'
          2        FETCH_R                      local               ~2      !0
          3        SEND_VAL                                                 ~2
          4        DO_ICALL                                                 
    7     5        FETCH_W                      local               $4      !0
          6        ASSIGN                                                   $4, 'herpderp'
    9     7        INIT_FCALL                                               'var_dump'
          8        FETCH_R                      local               ~6      !0
          9        SEND_VAL                                                 ~6
         10        DO_ICALL                                                 
   10    11        INIT_FCALL                                               'var_dump'
         12        FETCH_THIS                                       ~8      
         13        SEND_VAL                                                 ~8
         14        DO_ICALL                                                 
   11    15      > RETURN                                                   null

End of function bar

End of class Foo.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
172.67 ms | 1395 KiB | 15 Q