3v4l.org

run code in 300+ PHP versions simultaneously
<?php class foo { function bar() { $this->a = 5; } function foo() { unset($this->a); } } $f = new foo(); $f->bar(); var_dump($f); $f->foo(); var_dump($f);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/6rcts
function name:  (null)
number of ops:  14
compiled vars:  !0 = $f
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   17     0  E >   NEW                                              $1      'foo'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   19     3        INIT_METHOD_CALL                                         !0, 'bar'
          4        DO_FCALL                                      0          
   21     5        INIT_FCALL                                               'var_dump'
          6        SEND_VAR                                                 !0
          7        DO_ICALL                                                 
   23     8        INIT_METHOD_CALL                                         !0, 'foo'
          9        DO_FCALL                                      0          
   25    10        INIT_FCALL                                               'var_dump'
         11        SEND_VAR                                                 !0
         12        DO_ICALL                                                 
         13      > RETURN                                                   1

Class foo:
Function bar:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/6rcts
function name:  bar
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   ASSIGN_OBJ                                               'a'
          1        OP_DATA                                                  5
    8     2      > RETURN                                                   null

End of function bar

Function foo:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/6rcts
function name:  foo
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   UNSET_OBJ                                                'a'
   12     1      > RETURN                                                   null

End of function foo

End of class foo.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
178.43 ms | 1432 KiB | 14 Q