3v4l.org

run code in 300+ PHP versions simultaneously
<?php trait FooTrait { abstract public function getHandle(); public function foo() { return $this->getHandle();; } } trait BarTrait { use FooTrait; public function bar() { return "bar"; } } var_dump((new class { use BarTrait; public function getHandle() { return "Derp"; } })->foo());
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/mp8XA
function name:  (null)
number of ops:  10
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E >   DECLARE_CLASS                                            'bartrait'
   27     1        INIT_FCALL                                               'var_dump'
          2        DECLARE_ANON_CLASS                               <unknown> 
          3        NEW                                              $1      $0
          4        DO_FCALL                                      0          
   35     5        INIT_METHOD_CALL                                         $1, 'foo'
          6        DO_FCALL                                      0  $3      
          7        SEND_VAR                                                 $3
          8        DO_ICALL                                                 
          9      > RETURN                                                   1

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

End of function gethandle

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

End of function foo

End of class FooTrait.

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

End of function bar

End of class BarTrait.

Class class@anonymous:
Function gethandle:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/mp8XA
function name:  getHandle
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   32     0  E > > RETURN                                                   'Derp'
   33     1*     > RETURN                                                   null

End of function gethandle

End of class class@anonymous.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
169.71 ms | 1396 KiB | 15 Q