3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { private $shit = 'this'; public function bar() { $name = 'this'; var_dump($$name); $$name = 'herpderp'; var_dump($$name); var_dump($this->shit); } } $d = new Foo; $d->bar();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/AjQ8h
function name:  (null)
number of ops:  6
compiled vars:  !0 = $d
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   NEW                                              $1      'Foo'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   15     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/AjQ8h
function name:  bar
number of ops:  16
compiled vars:  !0 = $name
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   ASSIGN                                                   !0, 'this'
    7     1        INIT_FCALL                                               'var_dump'
          2        FETCH_R                      local               ~2      !0
          3        SEND_VAL                                                 ~2
          4        DO_ICALL                                                 
    8     5        FETCH_W                      local               $4      !0
          6        ASSIGN                                                   $4, 'herpderp'
   10     7        INIT_FCALL                                               'var_dump'
          8        FETCH_R                      local               ~6      !0
          9        SEND_VAL                                                 ~6
         10        DO_ICALL                                                 
   11    11        INIT_FCALL                                               'var_dump'
         12        FETCH_OBJ_R                                      ~8      'shit'
         13        SEND_VAL                                                 ~8
         14        DO_ICALL                                                 
   12    15      > RETURN                                                   null

End of function bar

End of class Foo.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
152.64 ms | 1395 KiB | 15 Q