3v4l.org

run code in 300+ PHP versions simultaneously
<?php class SklepKomputerowy{ private $d; private $m; private $komp; private $mysz; private $k; public function __construct($druk, $mon, $komp, $mysz, $klaw){ $this->d = $druk; $this->m = $mon; $this->komp = $komp; $this->mysz = $mysz; $this->k = $klaw; } protected function Twojadrukarka(){ $drukarki = array( 0 => "HP", 1 => "Canon", 2 => "Creaton" ); $drukarka = $this->drukarki[$this->d]; return $this->drukarka; } public function Pokaz(){ echo Twojadrukarka(); } } $Zestaw1 = new SklepKomputerowy(0, 1, 2, 3, 4); $Zestaw->Pokaz(); ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/cYV2J
function name:  (null)
number of ops:  11
compiled vars:  !0 = $Zestaw1, !1 = $Zestaw
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   31     0  E >   NEW                                              $2      'SklepKomputerowy'
          1        SEND_VAL_EX                                              0
          2        SEND_VAL_EX                                              1
          3        SEND_VAL_EX                                              2
          4        SEND_VAL_EX                                              3
          5        SEND_VAL_EX                                              4
          6        DO_FCALL                                      0          
          7        ASSIGN                                                   !0, $2
   32     8        INIT_METHOD_CALL                                         !1, 'Pokaz'
          9        DO_FCALL                                      0          
   33    10      > RETURN                                                   1

Class SklepKomputerowy:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/cYV2J
function name:  __construct
number of ops:  16
compiled vars:  !0 = $druk, !1 = $mon, !2 = $komp, !3 = $mysz, !4 = $klaw
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2        RECV                                             !2      
          3        RECV                                             !3      
          4        RECV                                             !4      
   11     5        ASSIGN_OBJ                                               'd'
          6        OP_DATA                                                  !0
   12     7        ASSIGN_OBJ                                               'm'
          8        OP_DATA                                                  !1
   13     9        ASSIGN_OBJ                                               'komp'
         10        OP_DATA                                                  !2
   14    11        ASSIGN_OBJ                                               'mysz'
         12        OP_DATA                                                  !3
   15    13        ASSIGN_OBJ                                               'k'
         14        OP_DATA                                                  !4
   16    15      > RETURN                                                   null

End of function __construct

Function twojadrukarka:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/cYV2J
function name:  Twojadrukarka
number of ops:  8
compiled vars:  !0 = $drukarki, !1 = $drukarka
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   19     0  E >   ASSIGN                                                   !0, <array>
   20     1        FETCH_OBJ_R                                      ~4      'd'
          2        FETCH_OBJ_R                                      ~3      'drukarki'
          3        FETCH_DIM_R                                      ~5      ~3, ~4
          4        ASSIGN                                                   !1, ~5
   21     5        FETCH_OBJ_R                                      ~7      'drukarka'
          6      > RETURN                                                   ~7
   23     7*     > RETURN                                                   null

End of function twojadrukarka

Function pokaz:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/cYV2J
function name:  Pokaz
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   26     0  E >   INIT_FCALL_BY_NAME                                       'Twojadrukarka'
          1        DO_FCALL                                      0  $0      
          2        ECHO                                                     $0
   27     3      > RETURN                                                   null

End of function pokaz

End of class SklepKomputerowy.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
180.68 ms | 1399 KiB | 13 Q