3v4l.org

run code in 300+ PHP versions simultaneously
<?php abstract class AbstractEmployee { protected $rank; protected $isBoss; public function __construct(int $rank, bool $isBoss) { $this->rank = $rank; $this->isBoss = $isBoss; } abstract function getBasicSalary(): float; abstract function getBasicCoffee(): float; abstract function getBasicPages(): float; public function getSalary(): float { $salary = $this->getBasicSalary(); if ($this->rank == 2) { $salary *= 1.25; } elseif ($this->rank == 3) { $salary *= 1.5; } if ($this->isBoss == true) { $salary *= 1.5; } return round($salary, 1); } public function getCoffee(): float { $coffee = $this->getBasicCoffee(); if ($this->isBoss == true) { $coffee *= 2; } return $coffee; } public function getPages(): float { $pages = $this->getBasicPages(); if ($this->isBoss == true) { $pages = 0; } return $pages; } } class Manager extends AbstractEmployee { public function getBasicSalary(): float { return 500; } public function getBasicCoffee(): float { return 20; } public function getBasicPages(): float { return 200; } } class Marketer extends AbstractEmployee { public function getBasicSalary(): float { return 400; } public function getBasicCoffee(): float { return 15; } public function getBasicPages(): float { return 150; } } class Engineer extends AbstractEmployee { public function getBasicSalary(): float { return 200; } public function getBasicCoffee(): float { return 5; } public function getBasicPages(): float { return 50; } } class Analyst extends AbstractEmployee { public function getBasicSalary(): float { return 800; } public function getBasicCoffee(): float { return 50; } public function getBasicPages(): float { return 5; } } class Department { private $name; private $employees = array(); public function __construct(string $name) { $this->name = $name; } public function addEmployees(int $count, string $profession, int $rank, bool $isBoss): void { if ($profession == "Manager") { for ($i = 0; $i < $count; $i++) { $this->employees[] = new Manager($rank, $isBoss); } } elseif ($profession == "Marketer") { for ($i = 0; $i < $count; $i++) { $this->employees[] = new Marketer($rank, $isBoss); } } elseif ($profession == "Engineer") { for ($i = 0; $i < $count; $i++) { $this->employees[] = new Engineer($rank, $isBoss); } } elseif ($profession == "Analyst") { for ($i = 0; $i < $count; $i++) { $this->employees[] = new Analyst($rank, $isBoss); } } } public function getInformation(): array { $information = array(); $information['name'] = $this->name; $information['employeesCount'] = count($this->employees); $information['selary'] = 0; $information['coffee'] = 0; $information['pages'] = 0; foreach ($this->employees as $employee) { $information['selary'] += $employee->getSalary(); $information['coffee'] += $employee->getCoffee(); $information['pages'] += $employee->getPages(); } return $information; } } class Vektor { private $departments = array(); public function addDepartment (Department $department): void { $this->departments[] = $department; } public function getDepartments(): array { return $this->departments; } public function getDepartmentsCount(): int { return count($this->departments); } } class Table { public function printTable (Vektor $vektor): void { $this->printLine("Департамент", "сотр.", "тугр.", "кофе", "стр.", "тугр/стр."); echo str_repeat("-", 70); echo "\n"; $employeesCount = 0; $totalSelary = 0; $totalCoffee = 0; $totalPages = 0; $totalSelarySharePages = 0; foreach ($vektor->getDepartments() as $department) { $employeesCount += $department->getInformation()['employeesCount']; $totalSelary += $department->getInformation()['selary']; $totalCoffee += $department->getInformation()['coffee']; $totalPages += $department->getInformation()['pages']; $totalSelarySharePages += $totalSelary / $totalPages; $this->printLine($department->getInformation()['name'], $department->getInformation()['employeesCount'], $department->getInformation()['selary'], $department->getInformation()['coffee'], $department->getInformation()['pages'], round($department->getInformation()['selary'] / $department->getInformation()['pages']), 1); } echo "\n"; $this->printLine("Среднее", round($employeesCount / $vektor->getDepartmentsCount(), 1), round($totalSelary / $vektor->getDepartmentsCount(), 1), round($totalCoffee / $vektor->getDepartmentsCount(), 1), round($totalPages / $vektor->getDepartmentsCount(), 1), round($totalSelarySharePages / $vektor->getDepartmentsCount(), 1)); $this->printLine("Всего", $employeesCount, $totalSelary, $totalCoffee, $totalPages, round($totalSelarySharePages, 1)); } private function printLine(string $title, $employees, $salary, $coffee, $pages, $salarySharePages): void { echo $this->padRight($title, 15); $this->padLeft($employees, 10) . $this->padLeft($salary, 10) . $this->padLeft($coffee, 10) . $this->padLeft($pages, 10) . $this->padLeft($salarySharePages, 15); echo "\n"; } private function padLeft ($field, int $col): void { echo str_repeat(" ", $col - mb_strlen($field)).$field; } private function padRight ($field, int $col) { echo $field.str_repeat(" ", $col - mb_strlen($field)); } } $procurementDepartment = new Department("Закупок"); $procurementDepartment->addEmployees(9, "Manager", 1, false); $procurementDepartment->addEmployees(3, "Manager", 2, false); $procurementDepartment->addEmployees(2, "Manager", 3, false); $procurementDepartment->addEmployees(2, "Marketer", 1, false); $procurementDepartment->addEmployees(1, "Manager", 2, true); $salesDepartment = new Department("Продаж"); $salesDepartment->addEmployees(12, "Manager", 1, false); $salesDepartment->addEmployees(6, "Marketer", 1, false); $salesDepartment->addEmployees(3, "Analyst", 1, false); $salesDepartment->addEmployees(2, "Analyst", 2, false); $salesDepartment->addEmployees(1, "Marketer", 2, true); $advertisingDepartment = new Department("Рекламы"); $advertisingDepartment->addEmployees(15, "Marketer", 1, false); $advertisingDepartment->addEmployees(10, "Marketer", 2, false); $advertisingDepartment->addEmployees(8, "Manager", 1, false); $advertisingDepartment->addEmployees(2, "Engineer", 1, false); $advertisingDepartment->addEmployees(1, "Marketer", 3, true); $logisticsDepartment = new Department("Логистики"); $logisticsDepartment->addEmployees(13, "Manager", 1, false); $logisticsDepartment->addEmployees(5, "Manager", 2, false); $logisticsDepartment->addEmployees(5, "Engineer", 1, false); $logisticsDepartment->addEmployees(1, "Manager", 1, true); $vektor = new Vektor(); $vektor->addDepartment($procurementDepartment); $vektor->addDepartment($salesDepartment); $vektor->addDepartment($advertisingDepartment); $vektor->addDepartment($logisticsDepartment); $table = new Table(); $table->printTable($vektor);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/3avqA
function name:  (null)
number of ops:  152
compiled vars:  !0 = $procurementDepartment, !1 = $salesDepartment, !2 = $advertisingDepartment, !3 = $logisticsDepartment, !4 = $vektor, !5 = $table
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  231     0  E >   NEW                                              $6      'Department'
          1        SEND_VAL_EX                                              '%D0%97%D0%B0%D0%BA%D1%83%D0%BF%D0%BE%D0%BA'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $6
  232     4        INIT_METHOD_CALL                                         !0, 'addEmployees'
          5        SEND_VAL_EX                                              9
          6        SEND_VAL_EX                                              'Manager'
          7        SEND_VAL_EX                                              1
          8        SEND_VAL_EX                                              <false>
          9        DO_FCALL                                      0          
  233    10        INIT_METHOD_CALL                                         !0, 'addEmployees'
         11        SEND_VAL_EX                                              3
         12        SEND_VAL_EX                                              'Manager'
         13        SEND_VAL_EX                                              2
         14        SEND_VAL_EX                                              <false>
         15        DO_FCALL                                      0          
  234    16        INIT_METHOD_CALL                                         !0, 'addEmployees'
         17        SEND_VAL_EX                                              2
         18        SEND_VAL_EX                                              'Manager'
         19        SEND_VAL_EX                                              3
         20        SEND_VAL_EX                                              <false>
         21        DO_FCALL                                      0          
  235    22        INIT_METHOD_CALL                                         !0, 'addEmployees'
         23        SEND_VAL_EX                                              2
         24        SEND_VAL_EX                                              'Marketer'
         25        SEND_VAL_EX                                              1
         26        SEND_VAL_EX                                              <false>
         27        DO_FCALL                                      0          
  236    28        INIT_METHOD_CALL                                         !0, 'addEmployees'
         29        SEND_VAL_EX                                              1
         30        SEND_VAL_EX                                              'Manager'
         31        SEND_VAL_EX                                              2
         32        SEND_VAL_EX                                              <true>
         33        DO_FCALL                                      0          
  238    34        NEW                                              $14     'Department'
         35        SEND_VAL_EX                                              '%D0%9F%D1%80%D0%BE%D0%B4%D0%B0%D0%B6'
         36        DO_FCALL                                      0          
         37        ASSIGN                                                   !1, $14
  239    38        INIT_METHOD_CALL                                         !1, 'addEmployees'
         39        SEND_VAL_EX                                              12
         40        SEND_VAL_EX                                              'Manager'
         41        SEND_VAL_EX                                              1
         42        SEND_VAL_EX                                              <false>
         43        DO_FCALL                                      0          
  240    44        INIT_METHOD_CALL                                         !1, 'addEmployees'
         45        SEND_VAL_EX                                              6
         46        SEND_VAL_EX                                              'Marketer'
         47        SEND_VAL_EX                                              1
         48        SEND_VAL_EX                                              <false>
         49        DO_FCALL                                      0          
  241    50        INIT_METHOD_CALL                                         !1, 'addEmployees'
         51        SEND_VAL_EX                                              3
         52        SEND_VAL_EX                                              'Analyst'
         53        SEND_VAL_EX                                              1
         54        SEND_VAL_EX                                              <false>
         55        DO_FCALL                                      0          
  242    56        INIT_METHOD_CALL                                         !1, 'addEmployees'
         57        SEND_VAL_EX                                              2
         58        SEND_VAL_EX                                              'Analyst'
         59        SEND_VAL_EX                                              2
         60        SEND_VAL_EX                                              <false>
         61        DO_FCALL                                      0          
  243    62        INIT_METHOD_CALL                                         !1, 'addEmployees'
         63        SEND_VAL_EX                                              1
         64        SEND_VAL_EX                                              'Marketer'
         65        SEND_VAL_EX                                              2
         66        SEND_VAL_EX                                              <true>
         67        DO_FCALL                                      0          
  246    68        NEW                                              $22     'Department'
         69        SEND_VAL_EX                                              '%D0%A0%D0%B5%D0%BA%D0%BB%D0%B0%D0%BC%D1%8B'
         70        DO_FCALL                                      0          
         71        ASSIGN                                                   !2, $22
  247    72        INIT_METHOD_CALL                                         !2, 'addEmployees'
         73        SEND_VAL_EX                                              15
         74        SEND_VAL_EX                                              'Marketer'
         75        SEND_VAL_EX                                              1
         76        SEND_VAL_EX                                              <false>
         77        DO_FCALL                                      0          
  248    78        INIT_METHOD_CALL                                         !2, 'addEmployees'
         79        SEND_VAL_EX                                              10
         80        SEND_VAL_EX                                              'Marketer'
         81        SEND_VAL_EX                                              2
         82        SEND_VAL_EX                                              <false>
         83        DO_FCALL                                      0          
  249    84        INIT_METHOD_CALL                                         !2, 'addEmployees'
         85        SEND_VAL_EX                                              8
         86        SEND_VAL_EX                                              'Manager'
         87        SEND_VAL_EX                                              1
         88        SEND_VAL_EX                                              <false>
         89        DO_FCALL                                      0          
  250    90        INIT_METHOD_CALL                                         !2, 'addEmployees'
         91        SEND_VAL_EX                                              2
         92        SEND_VAL_EX                                              'Engineer'
         93        SEND_VAL_EX                                              1
         94        SEND_VAL_EX                                              <false>
         95        DO_FCALL                                      0          
  251    96        INIT_METHOD_CALL                                         !2, 'addEmployees'
         97        SEND_VAL_EX                                              1
         98        SEND_VAL_EX                                              'Marketer'
         99        SEND_VAL_EX                                              3
        100        SEND_VAL_EX                                              <true>
        101        DO_FCALL                                      0          
  253   102        NEW                                              $30     'Department'
        103        SEND_VAL_EX                                              '%D0%9B%D0%BE%D0%B3%D0%B8%D1%81%D1%82%D0%B8%D0%BA%D0%B8'
        104        DO_FCALL                                      0          
        105        ASSIGN                                                   !3, $30
  254   106        INIT_METHOD_CALL                                         !3, 'addEmployees'
        107        SEND_VAL_EX                                              13
        108        SEND_VAL_EX                                              'Manager'
        109        SEND_VAL_EX                                              1
        110        SEND_VAL_EX                                              <false>
        111        DO_FCALL                                      0          
  255   112        INIT_METHOD_CALL                                         !3, 'addEmployees'
        113        SEND_VAL_EX                                              5
        114        SEND_VAL_EX                                              'Manager'
        115        SEND_VAL_EX                                              2
        116        SEND_VAL_EX                                              <false>
        117        DO_FCALL                                      0          
  256   118        INIT_METHOD_CALL                                         !3, 'addEmployees'
        119        SEND_VAL_EX                                              5
        120        SEND_VAL_EX                                              'Engineer'
        121        SEND_VAL_EX                                              1
        122        SEND_VAL_EX                                              <false>
        123        DO_FCALL                                      0          
  257   124        INIT_METHOD_CALL                                         !3, 'addEmployees'
        125        SEND_VAL_EX                                              1
        126        SEND_VAL_EX                                              'Manager'
        127        SEND_VAL_EX                                              1
        128        SEND_VAL_EX                                              <true>
        129        DO_FCALL                                      0          
  259   130        NEW                                              $37     'Vektor'
        131        DO_FCALL                                      0          
        132        ASSIGN                                                   !4, $37
  260   133        INIT_METHOD_CALL                                         !4, 'addDepartment'
        134        SEND_VAR_EX                                              !0
        135        DO_FCALL                                      0          
  261   136        INIT_METHOD_CALL                                         !4, 'addDepartment'
        137        SEND_VAR_EX                                              !1
        138        DO_FCALL                                      0          
  262   139        INIT_METHOD_CALL                                         !4, 'addDepartment'
        140        SEND_VAR_EX                                              !2
        141        DO_FCALL                                      0          
  263   142        INIT_METHOD_CALL                                         !4, 'addDepartment'
        143        SEND_VAR_EX                                              !3
        144        DO_FCALL                                      0          
  265   145        NEW                                              $44     'Table'
        146        DO_FCALL                                      0          
        147        ASSIGN                                                   !5, $44
  266   148        INIT_METHOD_CALL                                         !5, 'printTable'
        149        SEND_VAR_EX                                              !4
        150        DO_FCALL                                      0          
        151      > RETURN                                                   1

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

End of function __construct

Function getbasicsalary:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/3avqA
function name:  getBasicSalary
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   VERIFY_RETURN_TYPE                                       
          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/3avqA
function name:  getBasicCoffee
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   VERIFY_RETURN_TYPE                                       
          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/3avqA
function name:  getBasicPages
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   VERIFY_RETURN_TYPE                                       
          1      > RETURN                                                   null

End of function getbasicpages

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/3avqA
function name:  getSalary
number of ops:  24
compiled vars:  !0 = $salary
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   17     0  E >   INIT_METHOD_CALL                                         'getBasicSalary'
          1        DO_FCALL                                      0  $1      
          2        ASSIGN                                                   !0, $1
   19     3        FETCH_OBJ_R                                      ~3      'rank'
          4        IS_EQUAL                                                 ~3, 2
          5      > JMPZ                                                     ~4, ->8
   20     6    >   ASSIGN_OP                                     3          !0, 1.25
          7      > JMP                                                      ->12
   21     8    >   FETCH_OBJ_R                                      ~6      'rank'
          9        IS_EQUAL                                                 ~6, 3
         10      > JMPZ                                                     ~7, ->12
   22    11    >   ASSIGN_OP                                     3          !0, 1.5
   25    12    >   FETCH_OBJ_R                                      ~9      'isBoss'
         13        BOOL                                             ~10     ~9
         14      > JMPZ                                                     ~10, ->16
   26    15    >   ASSIGN_OP                                     3          !0, 1.5
   29    16    >   INIT_FCALL                                               'round'
         17        SEND_VAR                                                 !0
         18        SEND_VAL                                                 1
         19        DO_ICALL                                         $12     
         20        VERIFY_RETURN_TYPE                                       $12
         21      > RETURN                                                   $12
   30    22*       VERIFY_RETURN_TYPE                                       
         23*     > 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/3avqA
function name:  getCoffee
number of ops:  11
compiled vars:  !0 = $coffee
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   33     0  E >   INIT_METHOD_CALL                                         'getBasicCoffee'
          1        DO_FCALL                                      0  $1      
          2        ASSIGN                                                   !0, $1
   35     3        FETCH_OBJ_R                                      ~3      'isBoss'
          4        BOOL                                             ~4      ~3
          5      > JMPZ                                                     ~4, ->7
   36     6    >   ASSIGN_OP                                     3          !0, 2
   39     7    >   VERIFY_RETURN_TYPE                                       !0
          8      > RETURN                                                   !0
   40     9*       VERIFY_RETURN_TYPE                                       
         10*     > 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/3avqA
function name:  getPages
number of ops:  11
compiled vars:  !0 = $pages
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   43     0  E >   INIT_METHOD_CALL                                         'getBasicPages'
          1        DO_FCALL                                      0  $1      
          2        ASSIGN                                                   !0, $1
   45     3        FETCH_OBJ_R                                      ~3      'isBoss'
          4        BOOL                                             ~4      ~3
          5      > JMPZ                                                     ~4, ->7
   46     6    >   ASSIGN                                                   !0, 0
   49     7    >   VERIFY_RETURN_TYPE                                       !0
          8      > RETURN                                                   !0
   50     9*       VERIFY_RETURN_TYPE                                       
         10*     > RETURN                                                   null

End of function getpages

End of class AbstractEmployee.

Class Manager:
Function getbasicsalary:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/3avqA
function name:  getBasicSalary
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   55     0  E >   VERIFY_RETURN_TYPE                               ~0      500
          1      > RETURN                                                   ~0
   56     2*       VERIFY_RETURN_TYPE                                       
          3*     > 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/3avqA
function name:  getBasicCoffee
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   59     0  E >   VERIFY_RETURN_TYPE                               ~0      20
          1      > RETURN                                                   ~0
   60     2*       VERIFY_RETURN_TYPE                                       
          3*     > 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/3avqA
function name:  getBasicPages
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   63     0  E >   VERIFY_RETURN_TYPE                               ~0      200
          1      > RETURN                                                   ~0
   64     2*       VERIFY_RETURN_TYPE                                       
          3*     > 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/3avqA
function name:  __construct
number of ops:  7
compiled vars:  !0 = $rank, !1 = $isBoss
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   RECV                                             !0      
          1        RECV                                             !1      
    8     2        ASSIGN_OBJ                                               'rank'
          3        OP_DATA                                                  !0
    9     4        ASSIGN_OBJ                                               'isBoss'
          5        OP_DATA                                                  !1
   10     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/3avqA
function name:  getSalary
number of ops:  24
compiled vars:  !0 = $salary
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   17     0  E >   INIT_METHOD_CALL                                         'getBasicSalary'
          1        DO_FCALL                                      0  $1      
          2        ASSIGN                                                   !0, $1
   19     3        FETCH_OBJ_R                                      ~3      'rank'
          4        IS_EQUAL                                                 ~3, 2
          5      > JMPZ                                                     ~4, ->8
   20     6    >   ASSIGN_OP                                     3          !0, 1.25
          7      > JMP                                                      ->12
   21     8    >   FETCH_OBJ_R                                      ~6      'rank'
          9        IS_EQUAL                                                 ~6, 3
         10      > JMPZ                                                     ~7, ->12
   22    11    >   ASSIGN_OP                                     3          !0, 1.5
   25    12    >   FETCH_OBJ_R                                      ~9      'isBoss'
         13        BOOL                                             ~10     ~9
         14      > JMPZ                                                     ~10, ->16
   26    15    >   ASSIGN_OP                                     3          !0, 1.5
   29    16    >   INIT_FCALL                                               'round'
         17        SEND_VAR                                                 !0
         18        SEND_VAL                                                 1
         19        DO_ICALL                                         $12     
         20        VERIFY_RETURN_TYPE                                       $12
         21      > RETURN                                                   $12
   30    22*       VERIFY_RETURN_TYPE                                       
         23*     > 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/3avqA
function name:  getCoffee
number of ops:  11
compiled vars:  !0 = $coffee
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   33     0  E >   INIT_METHOD_CALL                                         'getBasicCoffee'
          1        DO_FCALL                                      0  $1      
          2        ASSIGN                                                   !0, $1
   35     3        FETCH_OBJ_R                                      ~3      'isBoss'
          4        BOOL                                             ~4      ~3
          5      > JMPZ                                                     ~4, ->7
   36     6    >   ASSIGN_OP                                     3          !0, 2
   39     7    >   VERIFY_RETURN_TYPE                                       !0
          8      > RETURN                                                   !0
   40     9*       VERIFY_RETURN_TYPE                                       
         10*     > 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/3avqA
function name:  getPages
number of ops:  11
compiled vars:  !0 = $pages
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   43     0  E >   INIT_METHOD_CALL                                         'getBasicPages'
          1        DO_FCALL                                      0  $1      
          2        ASSIGN                                                   !0, $1
   45     3        FETCH_OBJ_R                                      ~3      'isBoss'
          4        BOOL                                             ~4      ~3
          5      > JMPZ                                                     ~4, ->7
   46     6    >   ASSIGN                                                   !0, 0
   49     7    >   VERIFY_RETURN_TYPE                                       !0
          8      > RETURN                                                   !0
   50     9*       VERIFY_RETURN_TYPE                                       
         10*     > 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/3avqA
function name:  getBasicSalary
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   69     0  E >   VERIFY_RETURN_TYPE                               ~0      400
          1      > RETURN                                                   ~0
   70     2*       VERIFY_RETURN_TYPE                                       
          3*     > 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/3avqA
function name:  getBasicCoffee
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   73     0  E >   VERIFY_RETURN_TYPE                               ~0      15
          1      > RETURN                                                   ~0
   74     2*       VERIFY_RETURN_TYPE                                       
          3*     > 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/3avqA
function name:  getBasicPages
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
179.89 ms | 1433 KiB | 15 Q