3v4l.org

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

Class A: [no user functions]
Class MyTrait:
Function coucou:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Ihekr
function name:  coucou
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   ECHO                                                     'coucou'
   15     1      > RETURN                                                   null

End of function coucou

End of class MyTrait.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
153.8 ms | 1397 KiB | 13 Q