3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Answer { public static function get() { return new self(); } public function the() { return new self(); } public function answer() { return 4; } } // end editing here $answer = new Answer; var_dump($answer->get()->the()->answer());
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/aNLG2
function name:  (null)
number of ops:  13
compiled vars:  !0 = $answer
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   25     0  E >   NEW                                              $1      'Answer'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   26     3        INIT_FCALL                                               'var_dump'
          4        INIT_METHOD_CALL                                         !0, 'get'
          5        DO_FCALL                                      0  $4      
          6        INIT_METHOD_CALL                                         $4, 'the'
          7        DO_FCALL                                      0  $5      
          8        INIT_METHOD_CALL                                         $5, 'answer'
          9        DO_FCALL                                      0  $6      
         10        SEND_VAR                                                 $6
         11        DO_ICALL                                                 
         12      > RETURN                                                   1

Class Answer:
Function get:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/aNLG2
function name:  get
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   NEW                          self                $0      
          1        DO_FCALL                                      0          
          2      > RETURN                                                   $0
    8     3*     > RETURN                                                   null

End of function get

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

End of function the

Function answer:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/aNLG2
function name:  answer
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   17     0  E > > RETURN                                                   4
   18     1*     > RETURN                                                   null

End of function answer

End of class Answer.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
152.54 ms | 1396 KiB | 15 Q