3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A { function bb() { echo 'parent-'; } } trait B { function bb() { echo 'trait-'; call_user_func_array("parent::bb", func_get_args()); //parent::bb(); } } class C extends A { use B; function bb() { echo 'class-'; B::bb(); parent::bb(); } } $o=new C; $o->bb();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/7qj25
function name:  (null)
number of ops:  7
compiled vars:  !0 = $o
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   17     0  E >   DECLARE_CLASS                                            'c', 'a'
   26     1        NEW                                              $1      'C'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $1
   27     4        INIT_METHOD_CALL                                         !0, 'bb'
          5        DO_FCALL                                      0          
          6      > RETURN                                                   1

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

End of function bb

End of class A.

Class B:
Function bb:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/7qj25
function name:  bb
number of ops:  7
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   ECHO                                                     'trait-'
   12     1        INIT_USER_CALL                                0          'call_user_func_array', 'parent%3A%3Abb'
          2        FUNC_GET_ARGS                                    ~0      
          3        SEND_ARRAY                                               ~0
          4        CHECK_UNDEF_ARGS                                         
          5        DO_FCALL                                      0          
   14     6      > RETURN                                                   null

End of function bb

End of class B.

Class C:
Function bb:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/7qj25
function name:  bb
number of ops:  6
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   20     0  E >   ECHO                                                     'class-'
   21     1        INIT_STATIC_METHOD_CALL                                  'B', 'bb'
          2        DO_FCALL                                      0          
   22     3        INIT_STATIC_METHOD_CALL                                  'bb'
          4        DO_FCALL                                      0          
   23     5      > RETURN                                                   null

End of function bb

End of class C.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
166.38 ms | 1395 KiB | 13 Q