3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Test { public function whatTheFuck() { ${'thi' . 's'} = 'tata'; $name = 'this'; var_dump($this); var_dump($$name); var_dump($this->getThis()); var_dump($$name->getThis()); // Fatal error! } public function getThis() { return $this; } } $t = new Test(); $t->whatTheFuck();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/KjuQk
function name:  (null)
number of ops:  6
compiled vars:  !0 = $t
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   24     0  E >   NEW                                              $1      'Test'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   25     3        INIT_METHOD_CALL                                         !0, 'whatTheFuck'
          4        DO_FCALL                                      0          
          5      > RETURN                                                   1

Class Test:
Function whatthefuck:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/KjuQk
function name:  whatTheFuck
number of ops:  23
compiled vars:  !0 = $name
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   FETCH_W                      local               $1      'this'
          1        ASSIGN                                                   $1, 'tata'
    8     2        ASSIGN                                                   !0, 'this'
   10     3        INIT_FCALL                                               'var_dump'
          4        FETCH_THIS                                       ~4      
          5        SEND_VAL                                                 ~4
          6        DO_ICALL                                                 
   11     7        INIT_FCALL                                               'var_dump'
          8        FETCH_R                      local               ~6      !0
          9        SEND_VAL                                                 ~6
         10        DO_ICALL                                                 
   13    11        INIT_FCALL                                               'var_dump'
         12        INIT_METHOD_CALL                                         'getThis'
         13        DO_FCALL                                      0  $8      
         14        SEND_VAR                                                 $8
         15        DO_ICALL                                                 
   15    16        INIT_FCALL                                               'var_dump'
         17        FETCH_R                      local               ~10     !0
         18        INIT_METHOD_CALL                                         ~10, 'getThis'
         19        DO_FCALL                                      0  $11     
         20        SEND_VAR                                                 $11
         21        DO_ICALL                                                 
   16    22      > RETURN                                                   null

End of function whatthefuck

Function getthis:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/KjuQk
function name:  getThis
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   20     0  E >   FETCH_THIS                                       ~0      
          1      > RETURN                                                   ~0
   21     2*     > RETURN                                                   null

End of function getthis

End of class Test.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
153.65 ms | 1396 KiB | 15 Q