3v4l.org

run code in 300+ PHP versions simultaneously
<?php trait dance{ public function dance(){ $this->walk(); } } class A{ use dance; public function walk() { echo 'go forward'; } } (new A())->dance();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/g1Ybd
function name:  (null)
number of ops:  6
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   DECLARE_CLASS                                            'a'
   17     1        NEW                                              $0      'A'
          2        DO_FCALL                                      0          
          3        INIT_METHOD_CALL                                         $0, 'dance'
          4        DO_FCALL                                      0          
          5      > RETURN                                                   1

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

End of function dance

End of class dance.

Class A:
Function walk:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/g1Ybd
function name:  walk
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   ECHO                                                     'go+forward'
   14     1      > RETURN                                                   null

End of function walk

End of class A.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
224.65 ms | 996 KiB | 13 Q