3v4l.org

run code in 300+ PHP versions simultaneously
<?php trait Foo { use Foo ; public function ff() {}} class Bar {use Foo; } class An extends Bar { use Foo; public $var; } var_dump((new An())->ff());
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/mUBDI
function name:  (null)
number of ops:  11
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   DECLARE_CLASS                                            'foo'
    4     1        DECLARE_CLASS                                            'bar'
    6     2        DECLARE_CLASS                                            'an', 'bar'
    8     3        INIT_FCALL                                               'var_dump'
          4        NEW                                              $0      'An'
          5        DO_FCALL                                      0          
          6        INIT_METHOD_CALL                                         $0, 'ff'
          7        DO_FCALL                                      0  $2      
          8        SEND_VAR                                                 $2
          9        DO_ICALL                                                 
         10      > RETURN                                                   1

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

End of function ff

End of class Foo.

Class Bar: [no user functions]
Class An: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
152.76 ms | 1399 KiB | 15 Q