3v4l.org

run code in 300+ PHP versions simultaneously
<?php class ToolbarItem { CONST TYPE_BUTTON = 1; CONST TYPE_LINK = 2; protected $label; protected $icon; protected $attributes = array(); protected $type = self::TYPE_BUTTON; public function __construct($label) { } public function setIcon() { } public function setAttr() { } public function setType($type = self::TYPE_BUTTON) { } public function getType() { return $this->type; } } $item = new ToolbarItem('Label'); echo $item->getType();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/5hJO0
function name:  (null)
number of ops:  8
compiled vars:  !0 = $item
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   39     0  E >   NEW                                              $1      'ToolbarItem'
          1        SEND_VAL_EX                                              'Label'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $1
   41     4        INIT_METHOD_CALL                                         !0, 'getType'
          5        DO_FCALL                                      0  $4      
          6        ECHO                                                     $4
          7      > RETURN                                                   1

Class ToolbarItem:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/5hJO0
function name:  __construct
number of ops:  2
compiled vars:  !0 = $label
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   RECV                                             !0      
   16     1      > RETURN                                                   null

End of function __construct

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

End of function seticon

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

End of function setattr

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

End of function settype

Function gettype:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/5hJO0
function name:  getType
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   35     0  E >   FETCH_OBJ_R                                      ~0      'type'
          1      > RETURN                                                   ~0
   36     2*     > RETURN                                                   null

End of function gettype

End of class ToolbarItem.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.66 ms | 1395 KiB | 13 Q