3v4l.org

run code in 300+ PHP versions simultaneously
<?php error_reporting(-1); abstract class AbstractWorker{ public $rank; public $isBoss; public $count; public $coffee; public $salary; public $pages; public function __construct($count, $rank, $isBoss) { $this->rank = $rank; $this->count = $count; $this->isBoss = $isBoss; } public function CalculationOfInformation($rank, $isBoss){ if ($this->rank == 2){ $this->salary = $this->salary * 1.25 * $this->count; } elseif ($this->rank == 3){ $this->salary = $this->salary * 1.5 * $this->count; } else { $this->salary = $this->salary * $this->count; } $this->coffee = $this->coffee * $this->count; $this->pages = $this->pages * $this->count; if ($this->isBoss == 1){ $this->salary *= 1.5; $this->coffee *= 2; $this->pages = 0; } } public function getInformation($value){ return $value; } } class Manager extends AbstractWorker{ public $coffee = 20; public $salary = 500; public $pages = 200; } class Marketer extends AbstractWorker{ public $coffee = 15; public $salary = 400; public $pages = 150; } class Engineer extends AbstractWorker{ public $coffee = 5; public $salary = 200; public $pages = 50; } class Analyst extends AbstractWorker{ public $coffee = 50; public $salary = 800; public $pages = 5; } class Department{ public $name; public $workers = array(); public function __construct($name) { $this->name = $name; } public function addWorkers(AbstractWorker $worker){ $worker->CalculationOfInformation($worker->rank, $worker->isBoss); $this->workers[] = $worker; } public function getInformarion (){ $informarion = array($this->name, 0, 0, 0, 0, 0); foreach ($this->workers as $worker) { $informarion[1] += $worker->getInformation($worker->count); $informarion[2] += $worker->getInformation($worker->salary); $informarion[3] += $worker->getInformation($worker->coffee); $informarion[4] += $worker->getInformation($worker->pages); } $informarion[5] = round($informarion[2] / $informarion[4], 1); return $informarion; } } class Company{ public $departments = array(); public function addDepartment(Department $department){ $this->departments[] = $department; } private function padLeft($value, $columnLength){ echo $value; echo str_repeat(" ", $columnLength - mb_strlen($value)); } private function calculatiotOfOutput(array $informarion){ $col1 = 15; $col2 = 8; $col3 = 10; $col4 = 8; $col5 = 8; $col6 = 15; echo $this->padLeft($informarion[0], $col1) . $this->padLeft($informarion[1], $col2) . $this->padLeft($informarion[2], $col3) . $this->padLeft($informarion[3], $col4) . $this->padLeft($informarion[4], $col5) . $this->padLeft($informarion[5], $col6) . "\n"; } public function printInformationOfDepartment(){ $columbNames = array("Департамент", "сотр.", "тугр.", "кофе", "стр.", "тугр./стр."); $this->calculatiotOfOutput($columbNames); echo "\n"; foreach ($this->departments as $department) { $informarion = $department->getInformarion(); $this->calculatiotOfOutput($informarion); } echo "\n"; $totalInformation = array("", 0, 0, 0, 0, 0); foreach ($this->departments as $department) { $informarion = $department->getInformarion(); $totalInformation[1] += $informarion[1]; $totalInformation[2] += $informarion[2]; $totalInformation[3] += $informarion[3]; $totalInformation[4] += $informarion[4]; $totalInformation[5] += $informarion[5]; } $totalInformation[0] = "Всего"; $averageInformation = array("", 0, 0, 0, 0, 0); for ($i = 1; $i < 6; $i++){ $averageInformation[$i] = round($totalInformation[$i] / count($this->departments), 1); } $averageInformation[0] = "Среднее"; $this->calculatiotOfOutput($averageInformation); $this->calculatiotOfOutput($totalInformation); } } $vektor = new Company; $vektor->addDepartment(new Department("Закупок")); $vektor->addDepartment(new Department("Продаж")); $vektor->addDepartment(new Department("Рекламы")); $vektor->addDepartment(new Department("Логистики")); $vektor->departments[0]->addWorkers(new Manager(9, 1, 0)); $vektor->departments[0]->addWorkers(new Manager(3, 2, 0)); $vektor->departments[0]->addWorkers(new Manager(2, 3, 0)); $vektor->departments[0]->addWorkers(new Marketer(2, 1, 0)); $vektor->departments[0]->addWorkers(new Manager(1, 2, 1)); $vektor->departments[1]->addWorkers(new Manager(12, 1, 0)); $vektor->departments[1]->addWorkers(new Marketer(6, 1, 0)); $vektor->departments[1]->addWorkers(new Analyst(3, 1, 0)); $vektor->departments[1]->addWorkers(new Marketer(2, 2, 0)); $vektor->departments[1]->addWorkers(new Marketer(1, 2, 1)); $vektor->departments[2]->addWorkers(new Marketer(15, 1, 0)); $vektor->departments[2]->addWorkers(new Marketer(10, 2, 0)); $vektor->departments[2]->addWorkers(new Manager(8, 1, 0)); $vektor->departments[2]->addWorkers(new Engineer(2, 1, 0)); $vektor->departments[2]->addWorkers(new Marketer(1, 3, 1)); $vektor->departments[3]->addWorkers(new Manager(13, 1, 0)); $vektor->departments[3]->addWorkers(new Manager(5, 2, 0)); $vektor->departments[3]->addWorkers(new Engineer(5, 1, 0)); $vektor->departments[3]->addWorkers(new Manager(1, 1, 1)); $vektor->printInformationOfDepartment();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/AKB4J
function name:  (null)
number of ops:  223
compiled vars:  !0 = $vektor
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'error_reporting'
          1        SEND_VAL                                                 -1
          2        DO_ICALL                                                 
  161     3        NEW                                              $2      'Company'
          4        DO_FCALL                                      0          
          5        ASSIGN                                                   !0, $2
  163     6        INIT_METHOD_CALL                                         !0, 'addDepartment'
          7        NEW                                              $5      'Department'
          8        SEND_VAL_EX                                              '%D0%97%D0%B0%D0%BA%D1%83%D0%BF%D0%BE%D0%BA'
          9        DO_FCALL                                      0          
         10        SEND_VAR_NO_REF_EX                                       $5
         11        DO_FCALL                                      0          
  164    12        INIT_METHOD_CALL                                         !0, 'addDepartment'
         13        NEW                                              $8      'Department'
         14        SEND_VAL_EX                                              '%D0%9F%D1%80%D0%BE%D0%B4%D0%B0%D0%B6'
         15        DO_FCALL                                      0          
         16        SEND_VAR_NO_REF_EX                                       $8
         17        DO_FCALL                                      0          
  165    18        INIT_METHOD_CALL                                         !0, 'addDepartment'
         19        NEW                                              $11     'Department'
         20        SEND_VAL_EX                                              '%D0%A0%D0%B5%D0%BA%D0%BB%D0%B0%D0%BC%D1%8B'
         21        DO_FCALL                                      0          
         22        SEND_VAR_NO_REF_EX                                       $11
         23        DO_FCALL                                      0          
  166    24        INIT_METHOD_CALL                                         !0, 'addDepartment'
         25        NEW                                              $14     'Department'
         26        SEND_VAL_EX                                              '%D0%9B%D0%BE%D0%B3%D0%B8%D1%81%D1%82%D0%B8%D0%BA%D0%B8'
         27        DO_FCALL                                      0          
         28        SEND_VAR_NO_REF_EX                                       $14
         29        DO_FCALL                                      0          
  168    30        FETCH_OBJ_R                                      ~17     !0, 'departments'
         31        FETCH_DIM_R                                      ~18     ~17, 0
         32        INIT_METHOD_CALL                                         ~18, 'addWorkers'
         33        NEW                                              $19     'Manager'
         34        SEND_VAL_EX                                              9
         35        SEND_VAL_EX                                              1
         36        SEND_VAL_EX                                              0
         37        DO_FCALL                                      0          
         38        SEND_VAR_NO_REF_EX                                       $19
         39        DO_FCALL                                      0          
  169    40        FETCH_OBJ_R                                      ~22     !0, 'departments'
         41        FETCH_DIM_R                                      ~23     ~22, 0
         42        INIT_METHOD_CALL                                         ~23, 'addWorkers'
         43        NEW                                              $24     'Manager'
         44        SEND_VAL_EX                                              3
         45        SEND_VAL_EX                                              2
         46        SEND_VAL_EX                                              0
         47        DO_FCALL                                      0          
         48        SEND_VAR_NO_REF_EX                                       $24
         49        DO_FCALL                                      0          
  170    50        FETCH_OBJ_R                                      ~27     !0, 'departments'
         51        FETCH_DIM_R                                      ~28     ~27, 0
         52        INIT_METHOD_CALL                                         ~28, 'addWorkers'
         53        NEW                                              $29     'Manager'
         54        SEND_VAL_EX                                              2
         55        SEND_VAL_EX                                              3
         56        SEND_VAL_EX                                              0
         57        DO_FCALL                                      0          
         58        SEND_VAR_NO_REF_EX                                       $29
         59        DO_FCALL                                      0          
  171    60        FETCH_OBJ_R                                      ~32     !0, 'departments'
         61        FETCH_DIM_R                                      ~33     ~32, 0
         62        INIT_METHOD_CALL                                         ~33, 'addWorkers'
         63        NEW                                              $34     'Marketer'
         64        SEND_VAL_EX                                              2
         65        SEND_VAL_EX                                              1
         66        SEND_VAL_EX                                              0
         67        DO_FCALL                                      0          
         68        SEND_VAR_NO_REF_EX                                       $34
         69        DO_FCALL                                      0          
  172    70        FETCH_OBJ_R                                      ~37     !0, 'departments'
         71        FETCH_DIM_R                                      ~38     ~37, 0
         72        INIT_METHOD_CALL                                         ~38, 'addWorkers'
         73        NEW                                              $39     'Manager'
         74        SEND_VAL_EX                                              1
         75        SEND_VAL_EX                                              2
         76        SEND_VAL_EX                                              1
         77        DO_FCALL                                      0          
         78        SEND_VAR_NO_REF_EX                                       $39
         79        DO_FCALL                                      0          
  174    80        FETCH_OBJ_R                                      ~42     !0, 'departments'
         81        FETCH_DIM_R                                      ~43     ~42, 1
         82        INIT_METHOD_CALL                                         ~43, 'addWorkers'
         83        NEW                                              $44     'Manager'
         84        SEND_VAL_EX                                              12
         85        SEND_VAL_EX                                              1
         86        SEND_VAL_EX                                              0
         87        DO_FCALL                                      0          
         88        SEND_VAR_NO_REF_EX                                       $44
         89        DO_FCALL                                      0          
  175    90        FETCH_OBJ_R                                      ~47     !0, 'departments'
         91        FETCH_DIM_R                                      ~48     ~47, 1
         92        INIT_METHOD_CALL                                         ~48, 'addWorkers'
         93        NEW                                              $49     'Marketer'
         94        SEND_VAL_EX                                              6
         95        SEND_VAL_EX                                              1
         96        SEND_VAL_EX                                              0
         97        DO_FCALL                                      0          
         98        SEND_VAR_NO_REF_EX                                       $49
         99        DO_FCALL                                      0          
  176   100        FETCH_OBJ_R                                      ~52     !0, 'departments'
        101        FETCH_DIM_R                                      ~53     ~52, 1
        102        INIT_METHOD_CALL                                         ~53, 'addWorkers'
        103        NEW                                              $54     'Analyst'
        104        SEND_VAL_EX                                              3
        105        SEND_VAL_EX                                              1
        106        SEND_VAL_EX                                              0
        107        DO_FCALL                                      0          
        108        SEND_VAR_NO_REF_EX                                       $54
        109        DO_FCALL                                      0          
  177   110        FETCH_OBJ_R                                      ~57     !0, 'departments'
        111        FETCH_DIM_R                                      ~58     ~57, 1
        112        INIT_METHOD_CALL                                         ~58, 'addWorkers'
        113        NEW                                              $59     'Marketer'
        114        SEND_VAL_EX                                              2
        115        SEND_VAL_EX                                              2
        116        SEND_VAL_EX                                              0
        117        DO_FCALL                                      0          
        118        SEND_VAR_NO_REF_EX                                       $59
        119        DO_FCALL                                      0          
  178   120        FETCH_OBJ_R                                      ~62     !0, 'departments'
        121        FETCH_DIM_R                                      ~63     ~62, 1
        122        INIT_METHOD_CALL                                         ~63, 'addWorkers'
        123        NEW                                              $64     'Marketer'
        124        SEND_VAL_EX                                              1
        125        SEND_VAL_EX                                              2
        126        SEND_VAL_EX                                              1
        127        DO_FCALL                                      0          
        128        SEND_VAR_NO_REF_EX                                       $64
        129        DO_FCALL                                      0          
  180   130        FETCH_OBJ_R                                      ~67     !0, 'departments'
        131        FETCH_DIM_R                                      ~68     ~67, 2
        132        INIT_METHOD_CALL                                         ~68, 'addWorkers'
        133        NEW                                              $69     'Marketer'
        134        SEND_VAL_EX                                              15
        135        SEND_VAL_EX                                              1
        136        SEND_VAL_EX                                              0
        137        DO_FCALL                                      0          
        138        SEND_VAR_NO_REF_EX                                       $69
        139        DO_FCALL                                      0          
  181   140        FETCH_OBJ_R                                      ~72     !0, 'departments'
        141        FETCH_DIM_R                                      ~73     ~72, 2
        142        INIT_METHOD_CALL                                         ~73, 'addWorkers'
        143        NEW                                              $74     'Marketer'
        144        SEND_VAL_EX                                              10
        145        SEND_VAL_EX                                              2
        146        SEND_VAL_EX                                              0
        147        DO_FCALL                                      0          
        148        SEND_VAR_NO_REF_EX                                       $74
        149        DO_FCALL                                      0          
  182   150        FETCH_OBJ_R                                      ~77     !0, 'departments'
        151        FETCH_DIM_R                                      ~78     ~77, 2
        152        INIT_METHOD_CALL                                         ~78, 'addWorkers'
        153        NEW                                              $79     'Manager'
        154        SEND_VAL_EX                                              8
        155        SEND_VAL_EX                                              1
        156        SEND_VAL_EX                                              0
        157        DO_FCALL                                      0          
        158        SEND_VAR_NO_REF_EX                                       $79
        159        DO_FCALL                                      0          
  183   160        FETCH_OBJ_R                                      ~82     !0, 'departments'
        161        FETCH_DIM_R                                      ~83     ~82, 2
        162        INIT_METHOD_CALL                                         ~83, 'addWorkers'
        163        NEW                                              $84     'Engineer'
        164        SEND_VAL_EX                                              2
        165        SEND_VAL_EX                                              1
        166        SEND_VAL_EX                                              0
        167        DO_FCALL                                      0          
        168        SEND_VAR_NO_REF_EX                                       $84
        169        DO_FCALL                                      0          
  184   170        FETCH_OBJ_R                                      ~87     !0, 'departments'
        171        FETCH_DIM_R                                      ~88     ~87, 2
        172        INIT_METHOD_CALL                                         ~88, 'addWorkers'
        173        NEW                                              $89     'Marketer'
        174        SEND_VAL_EX                                              1
        175        SEND_VAL_EX                                              3
        176        SEND_VAL_EX                                              1
        177        DO_FCALL                                      0          
        178        SEND_VAR_NO_REF_EX                                       $89
        179        DO_FCALL                                      0          
  186   180        FETCH_OBJ_R                                      ~92     !0, 'departments'
        181        FETCH_DIM_R                                      ~93     ~92, 3
        182        INIT_METHOD_CALL                                         ~93, 'addWorkers'
        183        NEW                                              $94     'Manager'
        184        SEND_VAL_EX                                              13
        185        SEND_VAL_EX                                              1
        186        SEND_VAL_EX                                              0
        187        DO_FCALL                                      0          
        188        SEND_VAR_NO_REF_EX                                       $94
        189        DO_FCALL                                      0          
  187   190        FETCH_OBJ_R                                      ~97     !0, 'departments'
        191        FETCH_DIM_R                                      ~98     ~97, 3
        192        INIT_METHOD_CALL                                         ~98, 'addWorkers'
        193        NEW                                              $99     'Manager'
        194        SEND_VAL_EX                                              5
        195        SEND_VAL_EX                                              2
        196        SEND_VAL_EX                                              0
        197        DO_FCALL                                      0          
        198        SEND_VAR_NO_REF_EX                                       $99
        199        DO_FCALL                                      0          
  188   200        FETCH_OBJ_R                                      ~102    !0, 'departments'
        201        FETCH_DIM_R                                      ~103    ~102, 3
        202        INIT_METHOD_CALL                                         ~103, 'addWorkers'
        203        NEW                                              $104    'Engineer'
        204        SEND_VAL_EX                                              5
        205        SEND_VAL_EX                                              1
        206        SEND_VAL_EX                                              0
        207        DO_FCALL                                      0          
        208        SEND_VAR_NO_REF_EX                                       $104
        209        DO_FCALL                                      0          
  189   210        FETCH_OBJ_R                                      ~107    !0, 'departments'
        211        FETCH_DIM_R                                      ~108    ~107, 3
        212        INIT_METHOD_CALL                                         ~108, 'addWorkers'
        213        NEW                                              $109    'Manager'
        214        SEND_VAL_EX                                              1
        215        SEND_VAL_EX                                              1
        216        SEND_VAL_EX                                              1
        217        DO_FCALL                                      0          
        218        SEND_VAR_NO_REF_EX                                       $109
        219        DO_FCALL                                      0          
  191   220        INIT_METHOD_CALL                                         !0, 'printInformationOfDepartment'
        221        DO_FCALL                                      0          
        222      > RETURN                                                   1

Class AbstractWorker:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/AKB4J
function name:  __construct
number of ops:  10
compiled vars:  !0 = $count, !1 = $rank, !2 = $isBoss
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2        RECV                                             !2      
   14     3        ASSIGN_OBJ                                               'rank'
          4        OP_DATA                                                  !1
   15     5        ASSIGN_OBJ                                               'count'
          6        OP_DATA                                                  !0
   16     7        ASSIGN_OBJ                                               'isBoss'
          8        OP_DATA                                                  !2
   17     9      > RETURN                                                   null

End of function __construct

Function calculationofinformation:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 5, Position 2 = 12
Branch analysis from position: 5
1 jumps found. (Code = 42) Position 1 = 27
Branch analysis from position: 27
2 jumps found. (Code = 43) Position 1 = 40, Position 2 = 46
Branch analysis from position: 40
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 46
Branch analysis from position: 12
2 jumps found. (Code = 43) Position 1 = 15, Position 2 = 22
Branch analysis from position: 15
1 jumps found. (Code = 42) Position 1 = 27
Branch analysis from position: 27
Branch analysis from position: 22
2 jumps found. (Code = 43) Position 1 = 40, Position 2 = 46
Branch analysis from position: 40
Branch analysis from position: 46
filename:       /in/AKB4J
function name:  CalculationOfInformation
number of ops:  47
compiled vars:  !0 = $rank, !1 = $isBoss
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   19     0  E >   RECV                                             !0      
          1        RECV                                             !1      
   20     2        FETCH_OBJ_R                                      ~2      'rank'
          3        IS_EQUAL                                                 ~2, 2
          4      > JMPZ                                                     ~3, ->12
   21     5    >   FETCH_OBJ_R                                      ~5      'salary'
          6        MUL                                              ~6      ~5, 1.25
          7        FETCH_OBJ_R                                      ~7      'count'
          8        MUL                                              ~8      ~6, ~7
          9        ASSIGN_OBJ                                               'salary'
         10        OP_DATA                                                  ~8
         11      > JMP                                                      ->27
   22    12    >   FETCH_OBJ_R                                      ~9      'rank'
         13        IS_EQUAL                                                 ~9, 3
         14      > JMPZ                                                     ~10, ->22
   23    15    >   FETCH_OBJ_R                                      ~12     'salary'
         16        MUL                                              ~13     ~12, 1.5
         17        FETCH_OBJ_R                                      ~14     'count'
         18        MUL                                              ~15     ~13, ~14
         19        ASSIGN_OBJ                                               'salary'
         20        OP_DATA                                                  ~15
         21      > JMP                                                      ->27
   25    22    >   FETCH_OBJ_R                                      ~17     'salary'
         23        FETCH_OBJ_R                                      ~18     'count'
         24        MUL                                              ~19     ~17, ~18
         25        ASSIGN_OBJ                                               'salary'
         26        OP_DATA                                                  ~19
   28    27    >   FETCH_OBJ_R                                      ~21     'coffee'
         28        FETCH_OBJ_R                                      ~22     'count'
         29        MUL                                              ~23     ~21, ~22
         30        ASSIGN_OBJ                                               'coffee'
         31        OP_DATA                                                  ~23
   29    32        FETCH_OBJ_R                                      ~25     'pages'
         33        FETCH_OBJ_R                                      ~26     'count'
         34        MUL                                              ~27     ~25, ~26
         35        ASSIGN_OBJ                                               'pages'
         36        OP_DATA                                                  ~27
   31    37        FETCH_OBJ_R                                      ~28     'isBoss'
         38        IS_EQUAL                                                 ~28, 1
         39      > JMPZ                                                     ~29, ->46
   32    40    >   ASSIGN_OBJ_OP                                 3          'salary'
         41        OP_DATA                                                  1.5
   33    42        ASSIGN_OBJ_OP                                 3          'coffee'
         43        OP_DATA                                                  2
   34    44        ASSIGN_OBJ                                               'pages'
         45        OP_DATA                                                  0
   36    46    > > RETURN                                                   null

End of function calculationofinformation

Function getinformation:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/AKB4J
function name:  getInformation
number of ops:  3
compiled vars:  !0 = $value
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   38     0  E >   RECV                                             !0      
   39     1      > RETURN                                                   !0
   40     2*     > RETURN                                                   null

End of function getinformation

End of class AbstractWorker.

Class Manager:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/AKB4J
function name:  __construct
number of ops:  10
compiled vars:  !0 = $count, !1 = $rank, !2 = $isBoss
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2        RECV                                             !2      
   14     3        ASSIGN_OBJ                                               'rank'
          4        OP_DATA                                                  !1
   15     5        ASSIGN_OBJ                                               'count'
          6        OP_DATA                                                  !0
   16     7        ASSIGN_OBJ                                               'isBoss'
          8        OP_DATA                                                  !2
   17     9      > RETURN                                                   null

End of function __construct

Function calculationofinformation:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 5, Position 2 = 12
Branch analysis from position: 5
1 jumps found. (Code = 42) Position 1 = 27
Branch analysis from position: 27
2 jumps found. (Code = 43) Position 1 = 40, Position 2 = 46
Branch analysis from position: 40
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 46
Branch analysis from position: 12
2 jumps found. (Code = 43) Position 1 = 15, Position 2 = 22
Branch analysis from position: 15
1 jumps found. (Code = 42) Position 1 = 27
Branch analysis from position: 27
Branch analysis from position: 22
2 jumps found. (Code = 43) Position 1 = 40, Position 2 = 46
Branch analysis from position: 40
Branch analysis from position: 46
filename:       /in/AKB4J
function name:  CalculationOfInformation
number of ops:  47
compiled vars:  !0 = $rank, !1 = $isBoss
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   19     0  E >   RECV                                             !0      
          1        RECV                                             !1      
   20     2        FETCH_OBJ_R                                      ~2      'rank'
          3        IS_EQUAL                                                 ~2, 2
          4      > JMPZ                                                     ~3, ->12
   21     5    >   FETCH_OBJ_R                                      ~5      'salary'
          6        MUL                                              ~6      ~5, 1.25
          7        FETCH_OBJ_R                                      ~7      'count'
          8        MUL                                              ~8      ~6, ~7
          9        ASSIGN_OBJ                                               'salary'
         10        OP_DATA                                                  ~8
         11      > JMP                                                      ->27
   22    12    >   FETCH_OBJ_R                                      ~9      'rank'
         13        IS_EQUAL                                                 ~9, 3
         14      > JMPZ                                                     ~10, ->22
   23    15    >   FETCH_OBJ_R                                      ~12     'salary'
         16        MUL                                              ~13     ~12, 1.5
         17        FETCH_OBJ_R                                      ~14     'count'
         18        MUL                                              ~15     ~13, ~14
         19        ASSIGN_OBJ                                               'salary'
         20        OP_DATA                                                  ~15
         21      > JMP                                                      ->27
   25    22    >   FETCH_OBJ_R                                      ~17     'salary'
         23        FETCH_OBJ_R                                      ~18     'count'
         24        MUL                                              ~19     ~17, ~18
         25        ASSIGN_OBJ                                               'salary'
         26        OP_DATA                                                  ~19
   28    27    >   FETCH_OBJ_R                                      ~21     'coffee'
         28        FETCH_OBJ_R                                      ~22     'count'
         29        MUL                                              ~23     ~21, ~22
         30        ASSIGN_OBJ                                               'coffee'
         31        OP_DATA                                                  ~23
   29    32        FETCH_OBJ_R                                      ~25     'pages'
         33        FETCH_OBJ_R                                      ~26     'count'
         34        MUL                                              ~27     ~25, ~26
         35        ASSIGN_OBJ                                               'pages'
         36        OP_DATA                                                  ~27
   31    37        FETCH_OBJ_R                                      ~28     'isBoss'
         38        IS_EQUAL                                                 ~28, 1
         39      > JMPZ                                                     ~29, ->46
   32    40    >   ASSIGN_OBJ_OP                                 3          'salary'
         41        OP_DATA                                                  1.5
   33    42        ASSIGN_OBJ_OP                                 3          'coffee'
         43        OP_DATA                                                  2
   34    44        ASSIGN_OBJ                                               'pages'
         45        OP_DATA                                                  0
   36    46    > > RETURN                                                   null

End of function calculationofinformation

Function getinformation:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/AKB4J
function name:  getInformation
number of ops:  3
compiled vars:  !0 = $value
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   38     0  E >   RECV                                             !0      
   39     1      > RETURN    

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
198.31 ms | 1428 KiB | 15 Q