3v4l.org

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

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

End of function bar

Class Baz:
Function getanswer:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/P85bj
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.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
145.85 ms | 1014 KiB | 14 Q