3v4l.org

run code in 500+ PHP versions simultaneously
<?php class TestParent { public function execute(array $data) { return array( 'test' => 'test' ); } } trait TestTrait { public function execute(int $id) { return $id + 1; } } class TestClass extends TestParent { use TestTrait { execute as executeTrait; } function __construct() { var_dump($this->execute([])); var_dump($this->executeTrait(2)); } public function execute(array $data) { return parent::execute($data); } } new TestClass();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/gIq0E
function name:  (null)
number of ops:  5
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   21     0  E >   DECLARE_CLASS                                                'testclass', 'testparent'
   39     1        NEW                                                  $0      'TestClass'
          2        DO_FCALL                                          0          
          3        FREE                                                         $0
          4      > RETURN                                                       1

Class TestParent:
Function execute:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/gIq0E
function name:  execute
number of ops:  3
compiled vars:  !0 = $data
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    5     0  E >   RECV                                                 !0      
    8     1      > RETURN                                                       <array>
   10     2*     > RETURN                                                       null

End of function execute

End of class TestParent.

Class TestTrait:
Function execute:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/gIq0E
function name:  execute
number of ops:  4
compiled vars:  !0 = $id
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   15     0  E >   RECV                                                 !0      
   17     1        ADD                                                  ~1      !0, 1
          2      > RETURN                                                       ~1
   18     3*     > RETURN                                                       null

End of function execute

End of class TestTrait.

Class TestClass:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/gIq0E
function name:  __construct
number of ops:  13
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   29     0  E >   INIT_FCALL                                                   'var_dump'
          1        INIT_METHOD_CALL                                             'execute'
          2        SEND_VAL_EX                                                  <array>
          3        DO_FCALL                                          0  $0      
          4        SEND_VAR                                                     $0
          5        DO_ICALL                                                     
   30     6        INIT_FCALL                                                   'var_dump'
          7        INIT_METHOD_CALL                                             'executeTrait'
          8        SEND_VAL_EX                                                  2
          9        DO_FCALL                                          0  $2      
         10        SEND_VAR                                                     $2
         11        DO_ICALL                                                     
   31    12      > RETURN                                                       null

End of function __construct

Function execute:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/gIq0E
function name:  execute
number of ops:  6
compiled vars:  !0 = $data
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   33     0  E >   RECV                                                 !0      
   35     1        INIT_STATIC_METHOD_CALL                                      'execute'
          2        SEND_VAR_EX                                                  !0
          3        DO_FCALL                                          0  $1      
          4      > RETURN                                                       $1
   36     5*     > RETURN                                                       null

End of function execute

End of class TestClass.

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
162.9 ms | 2956 KiB | 14 Q