3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { public function bar() { $name = 'this'; $$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/hlKNf
function name:  (null)
number of ops:  6
compiled vars:  !0 = $d
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   NEW                                              $1      'Foo'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   13     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/hlKNf
function name:  bar
number of ops:  12
compiled vars:  !0 = $name
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   ASSIGN                                                   !0, 'this'
    6     1        FETCH_W                      local               $2      !0
          2        ASSIGN                                                   $2, 'herpderp'
    8     3        INIT_FCALL                                               'var_dump'
          4        FETCH_R                      local               ~4      !0
          5        SEND_VAL                                                 ~4
          6        DO_ICALL                                                 
    9     7        INIT_FCALL                                               'var_dump'
          8        FETCH_THIS                                       ~6      
          9        SEND_VAL                                                 ~6
         10        DO_ICALL                                                 
   10    11      > RETURN                                                   null

End of function bar

End of class Foo.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
153.75 ms | 1395 KiB | 15 Q