3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Unicorn{ public function approve(){} public function reject(){ echo 'reject method called'; } } class Brexit { protected $deal; public function __construct() { $this->deal = new Unicorn(); } } class Disaster extends Brexit { public function __construct() { parent::__construct(); $this->deal->reject(); } } new Disaster();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/NquoG
function name:  (null)
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   29     0  E >   NEW                                              $0      'Disaster'
          1        DO_FCALL                                      0          
          2        FREE                                                     $0
          3      > RETURN                                                   1

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

End of function approve

Function reject:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/NquoG
function name:  reject
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   ECHO                                                     'reject+method+called'
    7     1      > RETURN                                                   null

End of function reject

End of class Unicorn.

Class Brexit:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/NquoG
function name:  __construct
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   16     0  E >   NEW                                              $1      'Unicorn'
          1        DO_FCALL                                      0          
          2        ASSIGN_OBJ                                               'deal'
          3        OP_DATA                                                  $1
   17     4      > RETURN                                                   null

End of function __construct

End of class Brexit.

Class Disaster:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/NquoG
function name:  __construct
number of ops:  6
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   24     0  E >   INIT_STATIC_METHOD_CALL                                  
          1        DO_FCALL                                      0          
   25     2        FETCH_OBJ_R                                      ~1      'deal'
          3        INIT_METHOD_CALL                                         ~1, 'reject'
          4        DO_FCALL                                      0          
   26     5      > RETURN                                                   null

End of function __construct

End of class Disaster.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
183.29 ms | 1395 KiB | 13 Q