3v4l.org

run code in 500+ PHP versions simultaneously
<?php trait FooTrait { private function doFoo() { print "Hello world"; } } class Foo { use FooTrait; public function bar() { $this->doFoo(); } } $foo = new Foo(); $foo->bar();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/m3NC9
function name:  (null)
number of ops:  7
compiled vars:  !0 = $foo
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    9     0  E >   DECLARE_CLASS                                                'foo'
   18     1        NEW                                                  $1      'Foo'
          2        DO_FCALL                                          0          
          3        ASSIGN                                                       !0, $1
   19     4        INIT_METHOD_CALL                                             !0, 'bar'
          5        DO_FCALL                                          0          
          6      > RETURN                                                       1

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

End of function dofoo

End of class FooTrait.

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

End of function bar

End of class Foo.

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
245.56 ms | 2290 KiB | 8 Q