3v4l.org

run code in 300+ PHP versions simultaneously
<?php trait Test { public function getValue() { return 'TestTrait'; } } class Thing { use Test; public function getValue() { return 'ThingClass'; } } $thing = new Thing(); echo $thing->getValue();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/nd26u
function name:  (null)
number of ops:  8
compiled vars:  !0 = $thing
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   DECLARE_CLASS                                            'thing'
   17     1        NEW                                              $1      'Thing'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $1
   18     4        INIT_METHOD_CALL                                         !0, 'getValue'
          5        DO_FCALL                                      0  $4      
          6        ECHO                                                     $4
          7      > RETURN                                                   1

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

End of function getvalue

End of class Test.

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

End of function getvalue

End of class Thing.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
153.09 ms | 1394 KiB | 13 Q