3v4l.org

run code in 500+ PHP versions simultaneously
<?php class Baz { function GetAnswer() { return 42; } } class Foo { function Bar() { return new Baz(); } } echo (new Foo())->Bar()->GetAnswer();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/RSVg7
function name:  (null)
number of ops:  8
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   16     0  E >   NEW                                                  $0      'Foo'
          1        DO_FCALL                                          0          
          2        INIT_METHOD_CALL                                             $0, 'Bar'
          3        DO_FCALL                                          0  $2      
          4        INIT_METHOD_CALL                                             $2, 'GetAnswer'
          5        DO_FCALL                                          0  $3      
          6        ECHO                                                         $3
          7      > RETURN                                                       1

Class Baz:
Function getanswer:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/RSVg7
function name:  GetAnswer
number of ops:  2
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    5     0  E > > RETURN                                                       42
    6     1*     > RETURN                                                       null

End of function getanswer

End of class Baz.

Class Foo:
Function bar:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/RSVg7
function name:  Bar
number of ops:  4
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   12     0  E >   NEW                                                  $0      'Baz'
          1        DO_FCALL                                          0          
          2      > RETURN                                                       $0
   13     3*     > RETURN                                                       null

End of function bar

End of class Foo.

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
165.61 ms | 3036 KiB | 13 Q