3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Test { private $foo; private $baz = "okay"; public function __construct() { $this->foo = 'bar'; } public function getFoo(){ $foo = "fooey"; return $this->foo; } public function getBaz(){ return $this->baz; } public function DoSomething(){ echo $foo; echo $this->getFoo(),"\n"; echo $this->getBaz(); } } $t = new Test(); $t->DoSomething();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Mf0YR
function name:  (null)
number of ops:  6
compiled vars:  !0 = $t
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   26     0  E >   NEW                                              $1      'Test'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   28     3        INIT_METHOD_CALL                                         !0, 'DoSomething'
          4        DO_FCALL                                      0          
          5      > RETURN                                                   1

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

End of function __construct

Function getfoo:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Mf0YR
function name:  getFoo
number of ops:  4
compiled vars:  !0 = $foo
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   ASSIGN                                                   !0, 'fooey'
   13     1        FETCH_OBJ_R                                      ~2      'foo'
          2      > RETURN                                                   ~2
   14     3*     > RETURN                                                   null

End of function getfoo

Function getbaz:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Mf0YR
function name:  getBaz
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   16     0  E >   FETCH_OBJ_R                                      ~0      'baz'
          1      > RETURN                                                   ~0
   17     2*     > RETURN                                                   null

End of function getbaz

Function dosomething:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Mf0YR
function name:  DoSomething
number of ops:  9
compiled vars:  !0 = $foo
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   19     0  E >   ECHO                                                     !0
   20     1        INIT_METHOD_CALL                                         'getFoo'
          2        DO_FCALL                                      0  $1      
          3        ECHO                                                     $1
          4        ECHO                                                     '%0A'
   21     5        INIT_METHOD_CALL                                         'getBaz'
          6        DO_FCALL                                      0  $2      
          7        ECHO                                                     $2
   22     8      > RETURN                                                   null

End of function dosomething

End of class Test.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
141.49 ms | 1000 KiB | 13 Q