3v4l.org

run code in 300+ PHP versions simultaneously
<?php declare(strict_types=1); trait ControlHelper { public function getControl(string $name = self::CONTROL_TEST): void { echo $name; } } interface ControlInterface { public const CONTROL_TEST = 'test'; public function getControl(string $name = self::CONTROL_TEST): void; } abstract class BasePresenter implements ControlInterface { use ControlHelper; public const CONTROL_TEST = 'overriden'; } class Presenter extends BasePresenter { } $presenter = new Presenter(); $presenter->getControl();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/V4RNt
function name:  (null)
number of ops:  8
compiled vars:  !0 = $presenter
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   17     0  E >   DECLARE_CLASS                                            'basepresenter'
   22     1        DECLARE_CLASS                                            'presenter', 'basepresenter'
   27     2        NEW                                              $1      'Presenter'
          3        DO_FCALL                                      0          
          4        ASSIGN                                                   !0, $1
   28     5        INIT_METHOD_CALL                                         !0, 'getControl'
          6        DO_FCALL                                      0          
          7      > RETURN                                                   1

Class ControlHelper:
Function getcontrol:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/V4RNt
function name:  getControl
number of ops:  3
compiled vars:  !0 = $name
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   RECV_INIT                                        !0      <const ast>
    6     1        ECHO                                                     !0
    7     2      > RETURN                                                   null

End of function getcontrol

End of class ControlHelper.

Class ControlInterface:
Function getcontrol:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/V4RNt
function name:  getControl
number of ops:  2
compiled vars:  !0 = $name
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   RECV_INIT                                        !0      <const ast>
          1      > RETURN                                                   null

End of function getcontrol

End of class ControlInterface.

Class BasePresenter: [no user functions]
Class Presenter: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
145.63 ms | 1007 KiB | 13 Q