3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Test { var $foo = "bar"; function abc() { var_dump($this); echo "<br />"; var_dump($this->foo); echo "<hr />"; $thisStr = "this"; $$thisStr = "Hello!"; var_dump($this); echo "<br />"; } } $test = new Test(); $test->abc();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/7rMe1
function name:  (null)
number of ops:  6
compiled vars:  !0 = $test
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   19     0  E >   NEW                                              $1      'Test'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   20     3        INIT_METHOD_CALL                                         !0, 'abc'
          4        DO_FCALL                                      0          
          5      > RETURN                                                   1

Class Test:
Function abc:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/7rMe1
function name:  abc
number of ops:  19
compiled vars:  !0 = $thisStr
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   INIT_FCALL                                               'var_dump'
          1        FETCH_THIS                                       ~1      
          2        SEND_VAL                                                 ~1
          3        DO_ICALL                                                 
    8     4        ECHO                                                     '%3Cbr+%2F%3E'
    9     5        INIT_FCALL                                               'var_dump'
          6        FETCH_OBJ_R                                      ~3      'foo'
          7        SEND_VAL                                                 ~3
          8        DO_ICALL                                                 
   11     9        ECHO                                                     '%3Chr+%2F%3E'
   12    10        ASSIGN                                                   !0, 'this'
   13    11        FETCH_W                      local               $6      !0
         12        ASSIGN                                                   $6, 'Hello%21'
   15    13        INIT_FCALL                                               'var_dump'
         14        FETCH_THIS                                       ~8      
         15        SEND_VAL                                                 ~8
         16        DO_ICALL                                                 
   16    17        ECHO                                                     '%3Cbr+%2F%3E'
   17    18      > RETURN                                                   null

End of function abc

End of class Test.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.3 ms | 1395 KiB | 15 Q