3v4l.org

run code in 300+ PHP versions simultaneously
<?php trait Test2 { public function test2() { echo $this->test; } } class Foo { private $test = "bar"; } class Bar extends Foo { use Test2; } (new Bar())->test2();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/EACdd
function name:  (null)
number of ops:  6
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   16     0  E >   DECLARE_CLASS                                            'bar', 'foo'
   21     1        NEW                                              $0      'Bar'
          2        DO_FCALL                                      0          
          3        INIT_METHOD_CALL                                         $0, 'test2'
          4        DO_FCALL                                      0          
          5      > RETURN                                                   1

Class Test2:
Function test2:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/EACdd
function name:  test2
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   FETCH_OBJ_R                                      ~0      'test'
          1        ECHO                                                     ~0
    8     2      > RETURN                                                   null

End of function test2

End of class Test2.

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
145.77 ms | 1393 KiB | 13 Q