3v4l.org

run code in 300+ PHP versions simultaneously
<?php /** * Created by PhpStorm. * User: Саша * Date: 17.03.2017 * Time: 20:25 */ class Employee { public $rank = 1; public $coffee = 0; public $pages = 0; public $basicSalary = 0; public $boss = false; function __construct($rank, $boss = false) { $this->rank = $rank; $this->boss = $boss; } public function getSalary() { $rate = 0; if ($this->boss == true) { $bossRank = 1.5; } else { $bossRank = 1; } switch ($this->rank) { case 1: $rate = 1; break; case 2: $rate = 1.25; break; case 3: $rate = 1.5; break; } $rate *= $bossRank; return $this->basicSalary * $rate; } public function getCoffee() { if ($this->boss == true) { return $this->coffee * 2; } else { return $this->coffee; } } public function getPages() { if ($this->boss) { return 0; } else { return $this->pages; } } } class Manager extends Employee { public $rank = 1; public $boss = false; } class Marketer extends Employee { public $rank = 1; public $boss = false; } class Engineer extends Employee { public $rank = 1; public $boss = false; } class Analyst extends Employee { public $rank = 1; public $boss = false; } class Department { private $employees = []; private $name; function __construct($name) { $this->name = $name; } public function addEmployee($profession, $number, $rank = 1, $boss = false) { $variable = ''; for ($i = 0; $i < $number; $i++) { $variable = new $profession($rank, $boss); switch ($profession) { case 'Manager': $variable->basicSalary = 500; $variable->coffee = 20; $variable->pages = 200; break; case 'Marketer': $variable->basicSalary = 400; $variable->coffee = 15; $variable->pages = 150; break; case 'Engineer': $variable->basicSalary = 200; $variable->coffee = 5; $variable->pages = 50; break; case 'Analyst': $variable->basicSalary = 800; $variable->coffee = 50; $variable->pages = 5; break; } $this->employees[] = $variable; } } public function getName() { return $this->name; } public function getEmployeesNumber() { return count($this->employees); } public function getAllDepartmentSalary() { $result = 0; foreach ($this->employees as $employee) { $result += $employee->getSalary(); } return $result; } public function getAllDepartmentCoffee() { $result = 0; foreach ($this->employees as $employee) { $result += $employee->getCoffee(); } return $result; } public function getAllDepartmentPages() { $result = 0; foreach ($this->employees as $employee) { $result += $employee->getPages(); } return $result; } } function padRight($x, $y) { return $x . str_repeat(" ", $y - mb_strlen($x)); } function padLeft($x, $y) { return str_repeat(" ", $y - mb_strlen($x)) . $x; } function getTheValues($departments) { $col1 = 15; $col2 = 11; $countedColumns = $col1 + ($col2 * 5); $numberOfDepartments = count($departments); $allEmployees = 0; $allSalary = 0; $allCoffee = 0; $allPages = 0; $allMoneyPerPage = 0; echo padRight("Департамент", $col1) . padLeft("сотр.", $col2) . padLeft("тугр.", $col2) . padLeft("кофе", $col2) . padLeft("стр.", $col2) . padLeft("тугр./стр.", $col2) ."\n"; echo str_repeat("-", $countedColumns) ."\n"; foreach ($departments as $key => $value) { $name = $departments[$key]->getName(); $employees = $departments[$key]->getEmployeesNumber(); $salary = $departments[$key]->getAllDepartmentSalary(); $coffee = $departments[$key]->getAllDepartmentCoffee(); $pages = $departments[$key]->getAllDepartmentPages(); $moneyPerPage = round($salary / $pages, 2); echo padRight($name, $col1) . padLeft($employees, $col2) . padLeft($salary, $col2) . padLeft($coffee, $col2) . padLeft($pages, $col2) . padLeft($moneyPerPage, $col2) ."\n"; $allEmployees += $employees; $allSalary += $salary; $allCoffee += $coffee; $allPages += $pages; $allMoneyPerPage += $moneyPerPage; } echo str_repeat("-", $countedColumns) ."\n"; echo padRight("Среднее", $col1) . padLeft($allEmployees/$numberOfDepartments, $col2) . padLeft($allSalary/$numberOfDepartments, $col2) . padLeft($allCoffee/$numberOfDepartments, $col2) . padLeft($allPages/$numberOfDepartments, $col2) . padLeft($allMoneyPerPage/$numberOfDepartments, $col2) ."\n"; echo padRight("Всего", $col1) . padLeft($allEmployees, $col2) . padLeft($allSalary, $col2) . padLeft($allCoffee, $col2) . padLeft($allPages, $col2) . padLeft($allMoneyPerPage, $col2) ."\n"; } $procurementDepartment = new Department("Закупок"); $procurementDepartment->AddEmployee('Manager', 9); $procurementDepartment->AddEmployee('Manager', 3, 2); $procurementDepartment->AddEmployee('Manager', 2, 3); $procurementDepartment->AddEmployee('Marketer', 2, 1); $procurementDepartment->AddEmployee('Manager', 1, 2, true); $sellingDepartment = new Department("Продаж"); $sellingDepartment->AddEmployee('Manager', 12); $sellingDepartment->AddEmployee('Marketer', 6); $sellingDepartment->AddEmployee('Analyst', 3); $sellingDepartment->AddEmployee('Analyst', 2, 2); $sellingDepartment->AddEmployee('Manager', 1, 2, true); $advertisingDepartment = new Department("Рекламы"); $advertisingDepartment->AddEmployee('Marketer', 15); $advertisingDepartment->AddEmployee('Marketer', 10, 2); $advertisingDepartment->AddEmployee('Manager', 8); $advertisingDepartment->AddEmployee('Engineer', 2); $advertisingDepartment->AddEmployee('Manager', 1, 3, true); $logisticsDepartment = new Department("Логистики"); $logisticsDepartment->AddEmployee('Manager', 13); $logisticsDepartment->AddEmployee('Manager', 5, 2); $logisticsDepartment->AddEmployee('Engineer', 5); $logisticsDepartment->AddEmployee('Manager', 1, 1, true); $departments = [$procurementDepartment, $sellingDepartment, $advertisingDepartment, $logisticsDepartment]; getTheValues($departments);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/IC9kb
function name:  (null)
number of ops:  115
compiled vars:  !0 = $procurementDepartment, !1 = $sellingDepartment, !2 = $advertisingDepartment, !3 = $logisticsDepartment, !4 = $departments
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  219     0  E >   NEW                                              $5      '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, $5
  221     4        INIT_METHOD_CALL                                         !0, 'AddEmployee'
          5        SEND_VAL_EX                                              'Manager'
          6        SEND_VAL_EX                                              9
          7        DO_FCALL                                      0          
  222     8        INIT_METHOD_CALL                                         !0, 'AddEmployee'
          9        SEND_VAL_EX                                              'Manager'
         10        SEND_VAL_EX                                              3
         11        SEND_VAL_EX                                              2
         12        DO_FCALL                                      0          
  223    13        INIT_METHOD_CALL                                         !0, 'AddEmployee'
         14        SEND_VAL_EX                                              'Manager'
         15        SEND_VAL_EX                                              2
         16        SEND_VAL_EX                                              3
         17        DO_FCALL                                      0          
  224    18        INIT_METHOD_CALL                                         !0, 'AddEmployee'
         19        SEND_VAL_EX                                              'Marketer'
         20        SEND_VAL_EX                                              2
         21        SEND_VAL_EX                                              1
         22        DO_FCALL                                      0          
  225    23        INIT_METHOD_CALL                                         !0, 'AddEmployee'
         24        SEND_VAL_EX                                              'Manager'
         25        SEND_VAL_EX                                              1
         26        SEND_VAL_EX                                              2
         27        SEND_VAL_EX                                              <true>
         28        DO_FCALL                                      0          
  227    29        NEW                                              $13     'Department'
         30        SEND_VAL_EX                                              '%D0%9F%D1%80%D0%BE%D0%B4%D0%B0%D0%B6'
         31        DO_FCALL                                      0          
         32        ASSIGN                                                   !1, $13
  229    33        INIT_METHOD_CALL                                         !1, 'AddEmployee'
         34        SEND_VAL_EX                                              'Manager'
         35        SEND_VAL_EX                                              12
         36        DO_FCALL                                      0          
  230    37        INIT_METHOD_CALL                                         !1, 'AddEmployee'
         38        SEND_VAL_EX                                              'Marketer'
         39        SEND_VAL_EX                                              6
         40        DO_FCALL                                      0          
  231    41        INIT_METHOD_CALL                                         !1, 'AddEmployee'
         42        SEND_VAL_EX                                              'Analyst'
         43        SEND_VAL_EX                                              3
         44        DO_FCALL                                      0          
  232    45        INIT_METHOD_CALL                                         !1, 'AddEmployee'
         46        SEND_VAL_EX                                              'Analyst'
         47        SEND_VAL_EX                                              2
         48        SEND_VAL_EX                                              2
         49        DO_FCALL                                      0          
  233    50        INIT_METHOD_CALL                                         !1, 'AddEmployee'
         51        SEND_VAL_EX                                              'Manager'
         52        SEND_VAL_EX                                              1
         53        SEND_VAL_EX                                              2
         54        SEND_VAL_EX                                              <true>
         55        DO_FCALL                                      0          
  235    56        NEW                                              $21     'Department'
         57        SEND_VAL_EX                                              '%D0%A0%D0%B5%D0%BA%D0%BB%D0%B0%D0%BC%D1%8B'
         58        DO_FCALL                                      0          
         59        ASSIGN                                                   !2, $21
  237    60        INIT_METHOD_CALL                                         !2, 'AddEmployee'
         61        SEND_VAL_EX                                              'Marketer'
         62        SEND_VAL_EX                                              15
         63        DO_FCALL                                      0          
  238    64        INIT_METHOD_CALL                                         !2, 'AddEmployee'
         65        SEND_VAL_EX                                              'Marketer'
         66        SEND_VAL_EX                                              10
         67        SEND_VAL_EX                                              2
         68        DO_FCALL                                      0          
  239    69        INIT_METHOD_CALL                                         !2, 'AddEmployee'
         70        SEND_VAL_EX                                              'Manager'
         71        SEND_VAL_EX                                              8
         72        DO_FCALL                                      0          
  240    73        INIT_METHOD_CALL                                         !2, 'AddEmployee'
         74        SEND_VAL_EX                                              'Engineer'
         75        SEND_VAL_EX                                              2
         76        DO_FCALL                                      0          
  241    77        INIT_METHOD_CALL                                         !2, 'AddEmployee'
         78        SEND_VAL_EX                                              'Manager'
         79        SEND_VAL_EX                                              1
         80        SEND_VAL_EX                                              3
         81        SEND_VAL_EX                                              <true>
         82        DO_FCALL                                      0          
  243    83        NEW                                              $29     'Department'
         84        SEND_VAL_EX                                              '%D0%9B%D0%BE%D0%B3%D0%B8%D1%81%D1%82%D0%B8%D0%BA%D0%B8'
         85        DO_FCALL                                      0          
         86        ASSIGN                                                   !3, $29
  245    87        INIT_METHOD_CALL                                         !3, 'AddEmployee'
         88        SEND_VAL_EX                                              'Manager'
         89        SEND_VAL_EX                                              13
         90        DO_FCALL                                      0          
  246    91        INIT_METHOD_CALL                                         !3, 'AddEmployee'
         92        SEND_VAL_EX                                              'Manager'
         93        SEND_VAL_EX                                              5
         94        SEND_VAL_EX                                              2
         95        DO_FCALL                                      0          
  247    96        INIT_METHOD_CALL                                         !3, 'AddEmployee'
         97        SEND_VAL_EX                                              'Engineer'
         98        SEND_VAL_EX                                              5
         99        DO_FCALL                                      0          
  248   100        INIT_METHOD_CALL                                         !3, 'AddEmployee'
        101        SEND_VAL_EX                                              'Manager'
        102        SEND_VAL_EX                                              1
        103        SEND_VAL_EX                                              1
        104        SEND_VAL_EX                                              <true>
        105        DO_FCALL                                      0          
  250   106        INIT_ARRAY                                       ~36     !0
        107        ADD_ARRAY_ELEMENT                                ~36     !1
        108        ADD_ARRAY_ELEMENT                                ~36     !2
        109        ADD_ARRAY_ELEMENT                                ~36     !3
        110        ASSIGN                                                   !4, ~36
  252   111        INIT_FCALL                                               'getthevalues'
        112        SEND_VAR                                                 !4
        113        DO_FCALL                                      0          
        114      > RETURN                                                   1

Function padright:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/IC9kb
function name:  padRight
number of ops:  13
compiled vars:  !0 = $x, !1 = $y
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  153     0  E >   RECV                                             !0      
          1        RECV                                             !1      
  154     2        INIT_FCALL                                               'str_repeat'
          3        SEND_VAL                                                 '+'
          4        INIT_FCALL                                               'mb_strlen'
          5        SEND_VAR                                                 !0
          6        DO_ICALL                                         $2      
          7        SUB                                              ~3      !1, $2
          8        SEND_VAL                                                 ~3
          9        DO_ICALL                                         $4      
         10        CONCAT                                           ~5      !0, $4
         11      > RETURN                                                   ~5
  155    12*     > RETURN                                                   null

End of function padright

Function padleft:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/IC9kb
function name:  padLeft
number of ops:  13
compiled vars:  !0 = $x, !1 = $y
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  156     0  E >   RECV                                             !0      
          1        RECV                                             !1      
  157     2        INIT_FCALL                                               'str_repeat'
          3        SEND_VAL                                                 '+'
          4        INIT_FCALL                                               'mb_strlen'
          5        SEND_VAR                                                 !0
          6        DO_ICALL                                         $2      
          7        SUB                                              ~3      !1, $2
          8        SEND_VAL                                                 ~3
          9        DO_ICALL                                         $4      
         10        CONCAT                                           ~5      $4, !0
         11      > RETURN                                                   ~5
  158    12*     > RETURN                                                   null

End of function padleft

Function getthevalues:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 51, Position 2 = 116
Branch analysis from position: 51
2 jumps found. (Code = 78) Position 1 = 52, Position 2 = 116
Branch analysis from position: 52
1 jumps found. (Code = 42) Position 1 = 51
Branch analysis from position: 51
Branch analysis from position: 116
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 116
filename:       /in/IC9kb
function name:  getTheValues
number of ops:  191
compiled vars:  !0 = $departments, !1 = $col1, !2 = $col2, !3 = $countedColumns, !4 = $numberOfDepartments, !5 = $allEmployees, !6 = $allSalary, !7 = $allCoffee, !8 = $allPages, !9 = $allMoneyPerPage, !10 = $value, !11 = $key, !12 = $name, !13 = $employees, !14 = $salary, !15 = $coffee, !16 = $pages, !17 = $moneyPerPage
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  160     0  E >   RECV                                             !0      
  162     1        ASSIGN                                                   !1, 15
  163     2        ASSIGN                                                   !2, 11
  164     3        MUL                                              ~20     !2, 5
          4        ADD                                              ~21     !1, ~20
          5        ASSIGN                                                   !3, ~21
  165     6        COUNT                                            ~23     !0
          7        ASSIGN                                                   !4, ~23
  166     8        ASSIGN                                                   !5, 0
  167     9        ASSIGN                                                   !6, 0
  168    10        ASSIGN                                                   !7, 0
  169    11        ASSIGN                                                   !8, 0
  170    12        ASSIGN                                                   !9, 0
  172    13        INIT_FCALL                                               'padright'
         14        SEND_VAL                                                 '%D0%94%D0%B5%D0%BF%D0%B0%D1%80%D1%82%D0%B0%D0%BC%D0%B5%D0%BD%D1%82'
         15        SEND_VAR                                                 !1
         16        DO_FCALL                                      0  $30     
  173    17        INIT_FCALL                                               'padleft'
         18        SEND_VAL                                                 '%D1%81%D0%BE%D1%82%D1%80.'
         19        SEND_VAR                                                 !2
         20        DO_FCALL                                      0  $31     
         21        CONCAT                                           ~32     $30, $31
  174    22        INIT_FCALL                                               'padleft'
         23        SEND_VAL                                                 '%D1%82%D1%83%D0%B3%D1%80.'
         24        SEND_VAR                                                 !2
         25        DO_FCALL                                      0  $33     
         26        CONCAT                                           ~34     ~32, $33
  175    27        INIT_FCALL                                               'padleft'
         28        SEND_VAL                                                 '%D0%BA%D0%BE%D1%84%D0%B5'
         29        SEND_VAR                                                 !2
         30        DO_FCALL                                      0  $35     
         31        CONCAT                                           ~36     ~34, $35
  176    32        INIT_FCALL                                               'padleft'
         33        SEND_VAL                                                 '%D1%81%D1%82%D1%80.'
         34        SEND_VAR                                                 !2
         35        DO_FCALL                                      0  $37     
         36        CONCAT                                           ~38     ~36, $37
  177    37        INIT_FCALL                                               'padleft'
         38        SEND_VAL                                                 '%D1%82%D1%83%D0%B3%D1%80.%2F%D1%81%D1%82%D1%80.'
         39        SEND_VAR                                                 !2
         40        DO_FCALL                                      0  $39     
         41        CONCAT                                           ~40     ~38, $39
         42        CONCAT                                           ~41     ~40, '%0A'
         43        ECHO                                                     ~41
  179    44        INIT_FCALL                                               'str_repeat'
         45        SEND_VAL                                                 '-'
         46        SEND_VAR                                                 !3
         47        DO_ICALL                                         $42     
         48        CONCAT                                           ~43     $42, '%0A'
         49        ECHO                                                     ~43
  181    50      > FE_RESET_R                                       $44     !0, ->116
         51    > > FE_FETCH_R                                       ~45     $44, !10, ->116
         52    >   ASSIGN                                                   !11, ~45
  182    53        FETCH_DIM_R                                      ~47     !0, !11
         54        INIT_METHOD_CALL                                         ~47, 'getName'
         55        DO_FCALL                                      0  $48     
         56        ASSIGN                                                   !12, $48
  183    57        FETCH_DIM_R                                      ~50     !0, !11
         58        INIT_METHOD_CALL                                         ~50, 'getEmployeesNumber'
         59        DO_FCALL                                      0  $51     
         60        ASSIGN                                                   !13, $51
  184    61        FETCH_DIM_R                                      ~53     !0, !11
         62        INIT_METHOD_CALL                                         ~53, 'getAllDepartmentSalary'
         63        DO_FCALL                                      0  $54     
         64        ASSIGN                                                   !14, $54
  185    65        FETCH_DIM_R                                      ~56     !0, !11
         66        INIT_METHOD_CALL                                         ~56, 'getAllDepartmentCoffee'
         67        DO_FCALL                                      0  $57     
         68        ASSIGN                                                   !15, $57
  186    69        FETCH_DIM_R                                      ~59     !0, !11
         70        INIT_METHOD_CALL                                         ~59, 'getAllDepartmentPages'
         71        DO_FCALL                                      0  $60     
         72        ASSIGN                                                   !16, $60
  187    73        INIT_FCALL                                               'round'
         74        DIV                                              ~62     !14, !16
         75        SEND_VAL                                                 ~62
         76        SEND_VAL                                                 2
         77        DO_ICALL                                         $63     
         78        ASSIGN                                                   !17, $63
  189    79        INIT_FCALL                                               'padright'
         80        SEND_VAR                                                 !12
         81        SEND_VAR                                                 !1
         82        DO_FCALL                                      0  $65     
  190    83        INIT_FCALL                                               'padleft'
         84        SEND_VAR                                                 !13
         85        SEND_VAR                                                 !2
         86        DO_FCALL                                      0  $66     
         87        CONCAT                                           ~67     $65, $66
  191    88        INIT_FCALL                                               'padleft'
         89        SEND_VAR                                                 !14
         90        SEND_VAR                                                 !2
         91        DO_FCALL                                      0  $68     
         92        CONCAT                                           ~69     ~67, $68
  192    93        INIT_FCALL                                               'padleft'
         94        SEND_VAR                                                 !15
         95        SEND_VAR                                                 !2
         96        DO_FCALL                                      0  $70     
         97        CONCAT                                           ~71     ~69, $70
  193    98        INIT_FCALL                                               'padleft'
         99        SEND_VAR                                                 !16
        100        SEND_VAR                                                 !2
        101        DO_FCALL                                      0  $72     
        102        CONCAT                                           ~73     ~71, $72
  194   103        INIT_FCALL                                               'padleft'
        104        SEND_VAR                                                 !17
        105        SEND_VAR                                                 !2
        106        DO_FCALL                                      0  $74     
        107        CONCAT                                           ~75     ~73, $74
        108        CONCAT                                           ~76     ~75, '%0A'
        109        ECHO                                                     ~76
  196   110        ASSIGN_OP                                     1          !5, !13
  197   111        ASSIGN_OP                                     1          !6, !14
  198   112        ASSIGN_OP                                     1          !7, !15
  199   113        ASSIGN_OP                                     1          !8, !16
  200   114        ASSIGN_OP                                     1          !9, !17
  181   115      > JMP                                                      ->51
        116    >   FE_FREE                                                  $44
  202   117        INIT_FCALL                                               'str_repeat'
        118        SEND_VAL                                                 '-'
        119        SEND_VAR                                                 !3
        120        DO_ICALL                                         $82     
        121        CONCAT                                           ~83     $82, '%0A'
        122        ECHO                                                     ~83
  204   123        INIT_FCALL                                               'padright'
        124        SEND_VAL                                                 '%D0%A1%D1%80%D0%B5%D0%B4%D0%BD%D0%B5%D0%B5'
        125        SEND_VAR                                                 !1
        126        DO_FCALL                                      0  $84     
  205   127        INIT_FCALL                                               'padleft'
        128        DIV                                              ~85     !5, !4
        129        SEND_VAL                                                 ~85
        130        SEND_VAR                                                 !2
        131        DO_FCALL                                      0  $86     
        132        CONCAT                                           ~87     $84, $86
  206   133        INIT_FCALL                                               'padleft'
        134        DIV                                              ~88     !6, !4
        135        SEND_VAL                                                 ~88
        136        SEND_VAR                                                 !2
        137        DO_FCALL                                      0  $89     
        138        CONCAT                                           ~90     ~87, $89
  207   139        INIT_FCALL                                               'padleft'
        140        DIV                                              ~91     !7, !4
        141        SEND_VAL                                                 ~91
        142        SEND_VAR                                                 !2
        143        DO_FCALL                                      0  $92     
        144        CONCAT                                           ~93     ~90, $92
  208   145        INIT_FCALL                                               'padleft'
        146        DIV                                              ~94     !8, !4
        147        SEND_VAL                                                 ~94
        148        SEND_VAR                                                 !2
        149        DO_FCALL                                      0  $95     
        150        CONCAT                                           ~96     ~93, $95
  209   151        INIT_FCALL                                               'padleft'
        152        DIV                                              ~97     !9, !4
        153        SEND_VAL                                                 ~97
        154        SEND_VAR                                                 !2
        155        DO_FCALL                                      0  $98     
        156        CONCAT                                           ~99     ~96, $98
        157        CONCAT                                           ~100    ~99, '%0A'
        158        ECHO                                                     ~100
  211   159        INIT_FCALL                                               'padright'
        160        SEND_VAL                                                 '%D0%92%D1%81%D0%B5%D0%B3%D0%BE'
        161        SEND_VAR                                                 !1
        162        DO_FCALL                                      0  $101    
  212   163        INIT_FCALL                                               'padleft'
        164        SEND_VAR                                                 !5
        165        SEND_VAR                                                 !2
        166        DO_FCALL                                      0  $102    
        167        CONCAT                                           ~103    $101, $102
  213   168        INIT_FCALL                                               'padleft'
        169        SEND_VAR                                                 !6
        170        SEND_VAR                                                 !2
        171        DO_FCALL                                      0  $104    
        172        CONCAT                                           ~105    ~103, $104
  214   173        INIT_FCALL                                               'padleft'
        174        SEND_VAR                                                 !7
        175        SEND_VAR                                                 !2
        176        DO_FCALL                                      0  $106    
        177        CONCAT                                           ~107    ~105, $106
  215   178        INIT_FCALL                                               'padleft'
        179        SEND_VAR                                                 !8
        180        SEND_VAR                                                 !2
        181        DO_FCALL                                      0  $108    
        182        CONCAT                                           ~109    ~107, $108
  216   183        INIT_FCALL                                               'padleft'
        184        SEND_VAR                                                 !9
        185        SEND_VAR                                                 !2
        186        DO_FCALL                                      0  $110    
        187        CONCAT                                           ~111    ~109, $110
        188        CONCAT                                           ~112    ~111, '%0A'
        189        ECHO                                                     ~112
  217   190      > RETURN                                                   null

End of function getthevalues

Class Employee:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/IC9kb
function name:  __construct
number of ops:  7
compiled vars:  !0 = $rank, !1 = $boss
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   16     0  E >   RECV                                             !0      
          1        RECV_INIT                                        !1      <false>
   17     2        ASSIGN_OBJ                                               'rank'
          3        OP_DATA                                                  !0
   18     4        ASSIGN_OBJ                                               'boss'
          5        OP_DATA                                                  !1
   19     6      > RETURN                                                   null

End of function __construct

Function getsalary:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 4, Position 2 = 6
Branch analysis from position: 4
1 jumps found. (Code = 42) Position 1 = 7
Branch analysis from position: 7
2 jumps found. (Code = 44) Position 1 = 10, Position 2 = 15
Branch analysis from position: 10
2 jumps found. (Code = 44) Position 1 = 12, Position 2 = 17
Branch analysis from position: 12
2 jumps found. (Code = 44) Position 1 = 14, Position 2 = 19
Branch analysis from position: 14
1 jumps found. (Code = 42) Position 1 = 21
Branch analysis from position: 21
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 19
1 jumps found. (Code = 42) Position 1 = 21
Branch analysis from position: 21
Branch analysis from position: 17
1 jumps found. (Code = 42) Position 1 = 21
Branch analysis from position: 21
Branch analysis from position: 15
1 jumps found. (Code = 42) Position 1 = 21
Branch analysis from position: 21
Branch analysis from position: 6
2 jumps found. (Code = 44) Position 1 = 10, Position 2 = 15
Branch analysis from position: 10
Branch analysis from position: 15
filename:       /in/IC9kb
function name:  getSalary
number of ops:  27
compiled vars:  !0 = $rate, !1 = $bossRank
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   22     0  E >   ASSIGN                                                   !0, 0
   23     1        FETCH_OBJ_R                                      ~3      'boss'
          2        BOOL     

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
273.57 ms | 1431 KiB | 45 Q