3v4l.org

run code in 300+ PHP versions simultaneously
<?php interface EventInterface { const NAME = 'event.name'; public function getName(); } class NiceEvent implements EventInterface { const NAME = 'nice.event'; public function getName() { return self::NAME; } } $o = new NiceEvent; echo $o->getName();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/BSYqf
function name:  (null)
number of ops:  8
compiled vars:  !0 = $o
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   DECLARE_CLASS                                            'niceevent'
   20     1        NEW                                              $1      'NiceEvent'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $1
   21     4        INIT_METHOD_CALL                                         !0, 'getName'
          5        DO_FCALL                                      0  $4      
          6        ECHO                                                     $4
          7      > RETURN                                                   1

Class EventInterface:
Function getname:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/BSYqf
function name:  getName
number of ops:  1
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E > > RETURN                                                   null

End of function getname

End of class EventInterface.

Class NiceEvent:
Function getname:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/BSYqf
function name:  getName
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   16     0  E > > RETURN                                                   'nice.event'
   17     1*     > RETURN                                                   null

End of function getname

End of class NiceEvent.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
168.2 ms | 1393 KiB | 13 Q