3v4l.org

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

Class Foo:
Function clear:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/nClNs
function name:  clear
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   UNSET_OBJ                                                'untyped'
    9     1        UNSET_OBJ                                                'typed'
   10     2      > RETURN                                                   null

End of function clear

Function reinitialise:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/nClNs
function name:  reinitialise
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   ASSIGN_OBJ                                               'typed'
          1        OP_DATA                                                  'new'
   14     2        ASSIGN_OBJ                                               'untyped'
          3        OP_DATA                                                  'new'
   15     4      > RETURN                                                   null

End of function reinitialise

End of class Foo.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
148.77 ms | 1401 KiB | 15 Q