3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { public function getOne(){ return $this; } public function getTwo($two){ echo $two; return $this; } public function getThree(){ return 'param'; } public function go(){ $q = $this ->getOne() ->getTwo($q->getThree()); } } $foo = new Foo(); $foo->go();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/TClju
function name:  (null)
number of ops:  6
compiled vars:  !0 = $foo
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   20     0  E >   NEW                                              $1      'Foo'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   21     3        INIT_METHOD_CALL                                         !0, 'go'
          4        DO_FCALL                                      0          
          5      > RETURN                                                   1

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

End of function getone

Function gettwo:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/TClju
function name:  getTwo
number of ops:  5
compiled vars:  !0 = $two
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   RECV                                             !0      
    7     1        ECHO                                                     !0
    8     2        FETCH_THIS                                       ~1      
          3      > RETURN                                                   ~1
    9     4*     > RETURN                                                   null

End of function gettwo

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

End of function getthree

Function go:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/TClju
function name:  go
number of ops:  9
compiled vars:  !0 = $q
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E >   INIT_METHOD_CALL                                         'getOne'
          1        DO_FCALL                                      0  $1      
   16     2        INIT_METHOD_CALL                                         $1, 'getTwo'
          3        INIT_METHOD_CALL                                         !0, 'getThree'
          4        DO_FCALL                                      0  $2      
          5        SEND_VAR_NO_REF_EX                                       $2
          6        DO_FCALL                                      0  $3      
   14     7        ASSIGN                                                   !0, $3
   17     8      > RETURN                                                   null

End of function go

End of class Foo.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
160.56 ms | 1395 KiB | 13 Q