3v4l.org

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

Class Foo:
Function ff:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/0krLm
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:
164.02 ms | 1394 KiB | 15 Q