3v4l.org

run code in 300+ PHP versions simultaneously
<?php trait Foo { protected function lorem() { echo __METHOD__, "\n"; } } trait Bar { use Foo; protected function lorem() { echo __METHOD__, "{ \n"; Foo::lorem(); echo "}", __METHOD__, "\n"; } } class Lol { use Bar; public function ipsum() { $this->lorem(); } } $lol = new Lol; $lol->ipsum();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/PUYqr
function name:  (null)
number of ops:  8
compiled vars:  !0 = $lol
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   DECLARE_CLASS                                            'bar'
   18     1        DECLARE_CLASS                                            'lol'
   26     2        NEW                                              $1      'Lol'
          3        DO_FCALL                                      0          
          4        ASSIGN                                                   !0, $1
   27     5        INIT_METHOD_CALL                                         !0, 'ipsum'
          6        DO_FCALL                                      0          
          7      > RETURN                                                   1

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

End of function lorem

End of class Foo.

Class Bar:
Function lorem:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/PUYqr
function name:  lorem
number of ops:  8
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   ECHO                                                     'Bar%3A%3Alorem'
          1        ECHO                                                     '%7B+%0A'
   13     2        INIT_STATIC_METHOD_CALL                                  'Foo', 'lorem'
          3        DO_FCALL                                      0          
   14     4        ECHO                                                     '%7D'
          5        ECHO                                                     'Bar%3A%3Alorem'
          6        ECHO                                                     '%0A'
   15     7      > RETURN                                                   null

End of function lorem

End of class Bar.

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

End of function ipsum

End of class Lol.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
174.76 ms | 1395 KiB | 13 Q