3v4l.org

run code in 300+ PHP versions simultaneously
<?php trait FooTrait { public function foo() { echo('qwer'); } } class Foo2 { use FooTrait; public function foo() { echo('asdf'); } } $foo = new Foo2(); $foo->foo();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/lXfo0
function name:  (null)
number of ops:  7
compiled vars:  !0 = $foo
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   DECLARE_CLASS                                            'foo2'
   13     1        NEW                                              $1      'Foo2'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $1
   14     4        INIT_METHOD_CALL                                         !0, 'foo'
          5        DO_FCALL                                      0          
          6      > RETURN                                                   1

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

End of function foo

End of class FooTrait.

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

End of function foo

End of class Foo2.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.51 ms | 1394 KiB | 13 Q