3v4l.org

run code in 300+ PHP versions simultaneously
<?php error_reporting(-1); abstract class AbstractWorker{ public $rank; public $isBoss; public function __construct(int $rank, int $isBoss) { $this->rank = $rank; $this->isBoss = $isBoss; } public function getSalary(){ $salary = $this->getBasicSalary(); if ($this->rank == 2){ $salary *= 1.25; } elseif ($this->rank == 3){ $salary *= 1.5; } if ($this->isBoss == 1){ $salary *= 1.5; } return $salary; } public function getCoffee(){ $coffee = $this->getBasicCoffee(); if ($this->isBoss == 1){ $coffee *= 2; } return $coffee; } public function getPages(){ $pages = $this->getBasicPages(); if ($this->isBoss == 1){ $pages *= 0; } return $pages; } abstract function getBasicSalary(); abstract function getBasicCoffee(); abstract function getBasicPages(); } class Manager extends AbstractWorker{ public function getBasicSalary(){ return 500; } public function getBasicCoffee(){ return 20; } public function getBasicPages(){ return 200; } } class Marketer extends AbstractWorker{ public function getBasicSalary(){ return 400; } public function getBasicCoffee(){ return 15; } public function getBasicPages(){ return 150; } } class Engineer extends AbstractWorker{ public function getBasicSalary(){ return 200; } public function getBasicCoffee(){ return 5; } public function getBasicPages(){ return 50; } } class Analyst extends AbstractWorker{ public function getBasicSalary(){ return 800; } public function getBasicCoffee(){ return 50; } public function getBasicPages(){ return 5; } } class Department{ private $name; private $workers = array(); public function __construct(string $name) { $this->name = $name; } public function addWorker(AbstractWorker $worker){ $this->workers[] = $worker; } public function getNumberWorkers(){ return count($this->workers); } public function getDepartmentSalary(){ $totalSalary = 0; foreach ($this->workers as $worker) { $totalSalary += $worker->getSalary(); } return $totalSalary; } public function getDepartmentCoffee(){ $totalCoffee = 0; foreach ($this->workers as $worker) { $totalCoffee += $worker->getCoffee(); } return $totalCoffee; } public function getDepartmentPages(){ $totalPages = 0; foreach ($this->workers as $worker) { $totalPages += $worker->getPages(); } return $totalPages; } public function getDepartmentName(){ return $this->name; } public function addWorkersToDepartment(string $profession, int $count, int $rang, int $isBoss){ if ($profession == "Manager"){ for ($i = 0; $i < $count; $i++){ $this->addWorker(new Manager($rang, $isBoss)); } } elseif ($profession == "Marketer"){ for ($i = 0; $i < $count; $i++){ $this->addWorker(new Marketer($rang, $isBoss)); } } elseif ($profession == "Engineer"){ for ($i = 0; $i < $count; $i++){ $this->addWorker(new Engineer ($rang, $isBoss)); } } elseif ($profession == "Analyst"){ for ($i = 0; $i < $count; $i++){ $this->addWorker(new Analyst ($rang, $isBoss)); } } } } class Company{ private $departments = array(); public function addDepartment(Department $department){ $this->departments[] = $department; } public function getDepartments(){ return $this->departments; } public function getDepartmentCount(){ return count($this->departments); } } class Tabel{ private function padLeft($value, $columnLength){ echo $value; echo str_repeat(" ", $columnLength - mb_strlen($value)); } private function calculatiotOfOutput(array $informarion){ $col1 = 15; $col2 = 10; $col3 = 10; $col4 = 8; $col5 = 8; $col6 = 15; echo $this->padLeft($informarion["name"], $col1) . $this->padLeft($informarion["count"], $col2) . $this->padLeft($informarion["salary"], $col3) . $this->padLeft($informarion["coffee"], $col4) . $this->padLeft($informarion["pages"], $col5) . $this->padLeft($informarion["salaryDividePages"], $col6) . "\n"; } public function printTabel(Company $company){ $columnName = array("name" => "Департамент", "count" => "сотр.", "salary" => "тугр.", "coffee" => "кофе", "pages" => "стр.", "salaryDividePages" => "тугр./стр."); $this->calculatiotOfOutput($columnName); echo "\n"; $departmentInformation = array("name" => "", "count" => 0, "salary" => 0, "coffee" => 0, "pages" => 0, "salaryDividePages" => 0); foreach ($company->getDepartments() as $department) { $departmentInformation["name"] = $department->getDepartmentName(); $departmentInformation["count"] = $department->getNumberWorkers(); $departmentInformation["salary"] = $department->getDepartmentSalary(); $departmentInformation["coffee"] = $department->getDepartmentCoffee(); $departmentInformation["pages"] = $department->getDepartmentPages(); $departmentInformation["salaryDividePages"] = round($department->getDepartmentSalary() / $department->getDepartmentPages(), 1); $this->calculatiotOfOutput($departmentInformation); } echo "\n"; $totalInformation = array("name" => "Всего", "count" => 0, "salary" => 0, "coffee" => 0, "pages" => 0, "salaryDividePages" => 0); $totalInformation["name"] = "Всего"; foreach ($company->getDepartments() as $department) { $totalInformation["count"] += $department->getNumberWorkers(); $totalInformation["salary"] += $department->getDepartmentSalary(); $totalInformation["coffee"] += $department->getDepartmentCoffee(); $totalInformation["pages"] += $department->getDepartmentPages(); $totalInformation["salaryDividePages"] += round($department->getDepartmentSalary() / $department->getDepartmentPages(), 1); } $this->calculatiotOfOutput($totalInformation); $averageInformation = array("name" => "Среднее", "count" => round($totalInformation["count"] / $company->getDepartmentCount(), 1), "salary" => round($totalInformation["salary"] / $company->getDepartmentCount(), 1), "coffee" => round($totalInformation["coffee"] / $company->getDepartmentCount(), 1), "pages" => round($totalInformation["pages"] / $company->getDepartmentCount(), 1), "salaryDividePages" => round($totalInformation["salaryDividePages"] / $company->getDepartmentCount()), 1); $this->calculatiotOfOutput($averageInformation); } } $vektor = new Company; $tabel = new Tabel; $departmentOfProcurement = new Department("Закупок"); $departmentOfProcurement->addWorkersToDepartment("Manager", 9, 1, 0); $departmentOfProcurement->addWorkersToDepartment("Manager", 3, 2, 0); $departmentOfProcurement->addWorkersToDepartment("Manager", 2, 3, 0); $departmentOfProcurement->addWorkersToDepartment("Marketer", 2, 1, 0); $departmentOfProcurement->addWorkersToDepartment("Manager", 1, 2, 1); $departmentOfSales = new Department("Продаж"); $departmentOfSales->addWorkersToDepartment("Manager", 12, 1, 0); $departmentOfSales->addWorkersToDepartment("Marketer", 6, 1, 0); $departmentOfSales->addWorkersToDepartment("Analyst", 3, 1, 0); $departmentOfSales->addWorkersToDepartment("Analyst", 2, 2, 0); $departmentOfSales->addWorkersToDepartment("Marketer", 1, 2, 1); $departmentOfAdvertising = new Department("Рекламы"); $departmentOfAdvertising->addWorkersToDepartment("Marketer", 15, 1, 0); $departmentOfAdvertising->addWorkersToDepartment("Marketer", 10, 2, 0); $departmentOfAdvertising->addWorkersToDepartment("Manager", 8, 1, 0); $departmentOfAdvertising->addWorkersToDepartment("Engineer", 2, 1, 0); $departmentOfAdvertising->addWorkersToDepartment("Marketer", 1, 3, 1); $departmentOfLogistics = new Department("Логистики"); $departmentOfLogistics->addWorkersToDepartment("Manager", 13, 1, 0); $departmentOfLogistics->addWorkersToDepartment("Manager", 5, 2, 0); $departmentOfLogistics->addWorkersToDepartment("Engineer", 5, 1, 0); $departmentOfLogistics->addWorkersToDepartment("Manager", 1, 1, 1); $vektor->addDepartment($departmentOfProcurement); $vektor->addDepartment($departmentOfSales); $vektor->addDepartment($departmentOfAdvertising); $vektor->addDepartment($departmentOfLogistics); $tabel->printTabel($vektor);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/aJdlK
function name:  (null)
number of ops:  155
compiled vars:  !0 = $vektor, !1 = $tabel, !2 = $departmentOfProcurement, !3 = $departmentOfSales, !4 = $departmentOfAdvertising, !5 = $departmentOfLogistics
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   INIT_FCALL                                               'error_reporting'
          1        SEND_VAL                                                 -1
          2        DO_ICALL                                                 
  286     3        NEW                                              $7      'Company'
          4        DO_FCALL                                      0          
          5        ASSIGN                                                   !0, $7
  287     6        NEW                                              $10     'Tabel'
          7        DO_FCALL                                      0          
          8        ASSIGN                                                   !1, $10
  289     9        NEW                                              $13     'Department'
         10        SEND_VAL_EX                                              '%D0%97%D0%B0%D0%BA%D1%83%D0%BF%D0%BE%D0%BA'
         11        DO_FCALL                                      0          
         12        ASSIGN                                                   !2, $13
  290    13        INIT_METHOD_CALL                                         !2, 'addWorkersToDepartment'
         14        SEND_VAL_EX                                              'Manager'
         15        SEND_VAL_EX                                              9
         16        SEND_VAL_EX                                              1
         17        SEND_VAL_EX                                              0
         18        DO_FCALL                                      0          
  291    19        INIT_METHOD_CALL                                         !2, 'addWorkersToDepartment'
         20        SEND_VAL_EX                                              'Manager'
         21        SEND_VAL_EX                                              3
         22        SEND_VAL_EX                                              2
         23        SEND_VAL_EX                                              0
         24        DO_FCALL                                      0          
  292    25        INIT_METHOD_CALL                                         !2, 'addWorkersToDepartment'
         26        SEND_VAL_EX                                              'Manager'
         27        SEND_VAL_EX                                              2
         28        SEND_VAL_EX                                              3
         29        SEND_VAL_EX                                              0
         30        DO_FCALL                                      0          
  293    31        INIT_METHOD_CALL                                         !2, 'addWorkersToDepartment'
         32        SEND_VAL_EX                                              'Marketer'
         33        SEND_VAL_EX                                              2
         34        SEND_VAL_EX                                              1
         35        SEND_VAL_EX                                              0
         36        DO_FCALL                                      0          
  294    37        INIT_METHOD_CALL                                         !2, 'addWorkersToDepartment'
         38        SEND_VAL_EX                                              'Manager'
         39        SEND_VAL_EX                                              1
         40        SEND_VAL_EX                                              2
         41        SEND_VAL_EX                                              1
         42        DO_FCALL                                      0          
  296    43        NEW                                              $21     'Department'
         44        SEND_VAL_EX                                              '%D0%9F%D1%80%D0%BE%D0%B4%D0%B0%D0%B6'
         45        DO_FCALL                                      0          
         46        ASSIGN                                                   !3, $21
  297    47        INIT_METHOD_CALL                                         !3, 'addWorkersToDepartment'
         48        SEND_VAL_EX                                              'Manager'
         49        SEND_VAL_EX                                              12
         50        SEND_VAL_EX                                              1
         51        SEND_VAL_EX                                              0
         52        DO_FCALL                                      0          
  298    53        INIT_METHOD_CALL                                         !3, 'addWorkersToDepartment'
         54        SEND_VAL_EX                                              'Marketer'
         55        SEND_VAL_EX                                              6
         56        SEND_VAL_EX                                              1
         57        SEND_VAL_EX                                              0
         58        DO_FCALL                                      0          
  299    59        INIT_METHOD_CALL                                         !3, 'addWorkersToDepartment'
         60        SEND_VAL_EX                                              'Analyst'
         61        SEND_VAL_EX                                              3
         62        SEND_VAL_EX                                              1
         63        SEND_VAL_EX                                              0
         64        DO_FCALL                                      0          
  300    65        INIT_METHOD_CALL                                         !3, 'addWorkersToDepartment'
         66        SEND_VAL_EX                                              'Analyst'
         67        SEND_VAL_EX                                              2
         68        SEND_VAL_EX                                              2
         69        SEND_VAL_EX                                              0
         70        DO_FCALL                                      0          
  301    71        INIT_METHOD_CALL                                         !3, 'addWorkersToDepartment'
         72        SEND_VAL_EX                                              'Marketer'
         73        SEND_VAL_EX                                              1
         74        SEND_VAL_EX                                              2
         75        SEND_VAL_EX                                              1
         76        DO_FCALL                                      0          
  303    77        NEW                                              $29     'Department'
         78        SEND_VAL_EX                                              '%D0%A0%D0%B5%D0%BA%D0%BB%D0%B0%D0%BC%D1%8B'
         79        DO_FCALL                                      0          
         80        ASSIGN                                                   !4, $29
  304    81        INIT_METHOD_CALL                                         !4, 'addWorkersToDepartment'
         82        SEND_VAL_EX                                              'Marketer'
         83        SEND_VAL_EX                                              15
         84        SEND_VAL_EX                                              1
         85        SEND_VAL_EX                                              0
         86        DO_FCALL                                      0          
  305    87        INIT_METHOD_CALL                                         !4, 'addWorkersToDepartment'
         88        SEND_VAL_EX                                              'Marketer'
         89        SEND_VAL_EX                                              10
         90        SEND_VAL_EX                                              2
         91        SEND_VAL_EX                                              0
         92        DO_FCALL                                      0          
  306    93        INIT_METHOD_CALL                                         !4, 'addWorkersToDepartment'
         94        SEND_VAL_EX                                              'Manager'
         95        SEND_VAL_EX                                              8
         96        SEND_VAL_EX                                              1
         97        SEND_VAL_EX                                              0
         98        DO_FCALL                                      0          
  307    99        INIT_METHOD_CALL                                         !4, 'addWorkersToDepartment'
        100        SEND_VAL_EX                                              'Engineer'
        101        SEND_VAL_EX                                              2
        102        SEND_VAL_EX                                              1
        103        SEND_VAL_EX                                              0
        104        DO_FCALL                                      0          
  308   105        INIT_METHOD_CALL                                         !4, 'addWorkersToDepartment'
        106        SEND_VAL_EX                                              'Marketer'
        107        SEND_VAL_EX                                              1
        108        SEND_VAL_EX                                              3
        109        SEND_VAL_EX                                              1
        110        DO_FCALL                                      0          
  310   111        NEW                                              $37     'Department'
        112        SEND_VAL_EX                                              '%D0%9B%D0%BE%D0%B3%D0%B8%D1%81%D1%82%D0%B8%D0%BA%D0%B8'
        113        DO_FCALL                                      0          
        114        ASSIGN                                                   !5, $37
  311   115        INIT_METHOD_CALL                                         !5, 'addWorkersToDepartment'
        116        SEND_VAL_EX                                              'Manager'
        117        SEND_VAL_EX                                              13
        118        SEND_VAL_EX                                              1
        119        SEND_VAL_EX                                              0
        120        DO_FCALL                                      0          
  312   121        INIT_METHOD_CALL                                         !5, 'addWorkersToDepartment'
        122        SEND_VAL_EX                                              'Manager'
        123        SEND_VAL_EX                                              5
        124        SEND_VAL_EX                                              2
        125        SEND_VAL_EX                                              0
        126        DO_FCALL                                      0          
  313   127        INIT_METHOD_CALL                                         !5, 'addWorkersToDepartment'
        128        SEND_VAL_EX                                              'Engineer'
        129        SEND_VAL_EX                                              5
        130        SEND_VAL_EX                                              1
        131        SEND_VAL_EX                                              0
        132        DO_FCALL                                      0          
  314   133        INIT_METHOD_CALL                                         !5, 'addWorkersToDepartment'
        134        SEND_VAL_EX                                              'Manager'
        135        SEND_VAL_EX                                              1
        136        SEND_VAL_EX                                              1
        137        SEND_VAL_EX                                              1
        138        DO_FCALL                                      0          
  316   139        INIT_METHOD_CALL                                         !0, 'addDepartment'
        140        SEND_VAR_EX                                              !2
        141        DO_FCALL                                      0          
  317   142        INIT_METHOD_CALL                                         !0, 'addDepartment'
        143        SEND_VAR_EX                                              !3
        144        DO_FCALL                                      0          
  318   145        INIT_METHOD_CALL                                         !0, 'addDepartment'
        146        SEND_VAR_EX                                              !4
        147        DO_FCALL                                      0          
  319   148        INIT_METHOD_CALL                                         !0, 'addDepartment'
        149        SEND_VAR_EX                                              !5
        150        DO_FCALL                                      0          
  321   151        INIT_METHOD_CALL                                         !1, 'printTabel'
        152        SEND_VAR_EX                                              !0
        153        DO_FCALL                                      0          
        154      > RETURN                                                   1

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

End of function __construct

Function getsalary:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 6, Position 2 = 8
Branch analysis from position: 6
1 jumps found. (Code = 42) Position 1 = 12
Branch analysis from position: 12
2 jumps found. (Code = 43) Position 1 = 15, Position 2 = 16
Branch analysis from position: 15
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 16
Branch analysis from position: 8
2 jumps found. (Code = 43) Position 1 = 11, Position 2 = 12
Branch analysis from position: 11
2 jumps found. (Code = 43) Position 1 = 15, Position 2 = 16
Branch analysis from position: 15
Branch analysis from position: 16
Branch analysis from position: 12
filename:       /in/aJdlK
function name:  getSalary
number of ops:  18
compiled vars:  !0 = $salary
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   16     0  E >   INIT_METHOD_CALL                                         'getBasicSalary'
          1        DO_FCALL                                      0  $1      
          2        ASSIGN                                                   !0, $1
   18     3        FETCH_OBJ_R                                      ~3      'rank'
          4        IS_EQUAL                                                 ~3, 2
          5      > JMPZ                                                     ~4, ->8
   19     6    >   ASSIGN_OP                                     3          !0, 1.25
          7      > JMP                                                      ->12
   20     8    >   FETCH_OBJ_R                                      ~6      'rank'
          9        IS_EQUAL                                                 ~6, 3
         10      > JMPZ                                                     ~7, ->12
   21    11    >   ASSIGN_OP                                     3          !0, 1.5
   24    12    >   FETCH_OBJ_R                                      ~9      'isBoss'
         13        IS_EQUAL                                                 ~9, 1
         14      > JMPZ                                                     ~10, ->16
   25    15    >   ASSIGN_OP                                     3          !0, 1.5
   28    16    > > RETURN                                                   !0
   29    17*     > RETURN                                                   null

End of function getsalary

Function getcoffee:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 6, Position 2 = 7
Branch analysis from position: 6
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 7
filename:       /in/aJdlK
function name:  getCoffee
number of ops:  9
compiled vars:  !0 = $coffee
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   32     0  E >   INIT_METHOD_CALL                                         'getBasicCoffee'
          1        DO_FCALL                                      0  $1      
          2        ASSIGN                                                   !0, $1
   34     3        FETCH_OBJ_R                                      ~3      'isBoss'
          4        IS_EQUAL                                                 ~3, 1
          5      > JMPZ                                                     ~4, ->7
   35     6    >   ASSIGN_OP                                     3          !0, 2
   38     7    > > RETURN                                                   !0
   39     8*     > RETURN                                                   null

End of function getcoffee

Function getpages:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 6, Position 2 = 7
Branch analysis from position: 6
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 7
filename:       /in/aJdlK
function name:  getPages
number of ops:  9
compiled vars:  !0 = $pages
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   42     0  E >   INIT_METHOD_CALL                                         'getBasicPages'
          1        DO_FCALL                                      0  $1      
          2        ASSIGN                                                   !0, $1
   44     3        FETCH_OBJ_R                                      ~3      'isBoss'
          4        IS_EQUAL                                                 ~3, 1
          5      > JMPZ                                                     ~4, ->7
   45     6    >   ASSIGN_OP                                     3          !0, 0
   48     7    > > RETURN                                                   !0
   49     8*     > RETURN                                                   null

End of function getpages

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

End of function getbasicsalary

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

End of function getbasiccoffee

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

End of function getbasicpages

End of class AbstractWorker.

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

End of function getbasicsalary

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

End of function getbasiccoffee

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

End of function getbasicpages

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

End of function __construct

Function getsalary:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 6, Position 2 = 8
Branch analysis from position: 6
1 jumps found. (Code = 42) Position 1 = 12
Branch analysis from position: 12
2 jumps found. (Code = 43) Position 1 = 15, Position 2 = 16
Branch analysis from position: 15
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 16
Branch analysis from position: 8
2 jumps found. (Code = 43) Position 1 = 11, Position 2 = 12
Branch analysis from position: 11
2 jumps found. (Code = 43) Position 1 = 15, Position 2 = 16
Branch analysis from position: 15
Branch analysis from position: 16
Branch analysis from position: 12
filename:       /in/aJdlK
function name:  getSalary
number of ops:  18
compiled vars:  !0 = $salary
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   16     0  E >   INIT_METHOD_CALL                                         'getBasicSalary'
          1        DO_FCALL                                      0  $1      
          2        ASSIGN                                                   !0, $1
   18     3        FETCH_OBJ_R                                      ~3      'rank'
          4        IS_EQUAL                                                 ~3, 2
          5      > JMPZ                                                     ~4, ->8
   19     6    >   ASSIGN_OP                                     3          !0, 1.25
          7      > JMP                                                      ->12
   20     8    >   FETCH_OBJ_R                                      ~6      'rank'
          9        IS_EQUAL                                                 ~6, 3
         10      > JMPZ                                                     ~7, ->12
   21    11    >   ASSIGN_OP                                     3          !0, 1.5
   24    12    >   FETCH_OBJ_R                                      ~9      'isBoss'
         13        IS_EQUAL                                                 ~9, 1
         14      > JMPZ                                                     ~10, ->16
   25    15    >   ASSIGN_OP                                     3          !0, 1.5
   28    16    > > RETURN                                                   !0
   29    17*     > RETURN                                                   null

End of function getsalary

Function getcoffee:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 6, Position 2 = 7
Branch analysis from position: 6
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 7
filename:       /in/aJdlK
function name:  getCoffee
number of ops:  9
compiled vars:  !0 = $coffee
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   32     0  E >   INIT_METHOD_CALL                                         'getBasicCoffee'
          1        DO_FCALL                                      0  $1      
          2        ASSIGN                                                   !0, $1
   34     3        FETCH_OBJ_R                                      ~3      'isBoss'
          4        IS_EQUAL                                                 ~3, 1
          5      > JMPZ                                                     ~4, ->7
   35     6    >   ASSIGN_OP                                     3          !0, 2
   38     7    > > RETURN                                                   !0
   39     8*     > RETURN                                                   null

End of function getcoffee

Function getpages:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 6, Position 2 = 7
Branch analysis from position: 6
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 7
filename:       /in/aJdlK
function name:  getPages
number of ops:  9
compiled vars:  !0 = $pages
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   42     0  E >   INIT_METHOD_CALL                                         'getBasicPages'
          1        DO_FCALL                                      0  $1      
          2        ASSIGN                                                   !0, $1
   44     3        FETCH_OBJ_R                                      ~3      'isBoss'
          4        IS_EQUAL                                                 ~3, 1
          5      > JMPZ                                                     ~4, ->7
   45     6    >   ASSIGN_OP                                     3          !0, 0
   48     7    > > RETURN                                                   !0
   49     8*     > RETURN                                                   null

End of function getpages

End of class Manager.

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

End of function getbasicsalary

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

End of function getbasiccoffee

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

End of function getbasicpages

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

End of function __construct

Function getsalary:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 6, Position 2 = 8
Branch analysis from position: 6
1 jumps found. (Code = 42) Position 1 = 12
Branch analysis from position: 12
2 jumps found. (Code = 43) Position 1 = 15, Position 2 = 16
Branch analysis from position: 15
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 16
Branch analysis from position: 8
2 jumps found. (Code = 43) Position 1 = 11, Position 2 = 12
Branch analysis from position: 11
2 jumps found. (Code = 43) Position 1 = 15, Position 2 = 16
Branch analysis from position: 15
Branch analysis from position: 16
Branch analysis from position: 12
filename:       /in/aJdlK
function name:  getSalary
number of ops:  18
compiled vars:  !0 = $salary
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   16     0  E >   INIT_METHOD_CALL              

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
269.2 ms | 1428 KiB | 16 Q