fork(1) download
  1. <?php
  2.  
  3. class Number {
  4. public $number;
  5. public function __construcnt(){
  6. $this->number = $number;
  7. }
  8. public function getNumber($number){
  9. switch($number){
  10. case $number == 1:
  11. return "ruble";
  12. case $number == 2 || $number == 3 || $number == 4:
  13. return "rublya";
  14. case $number == 5 || $number == 6 || $number == 7 || $number == 8 || $number == 9:
  15. return "rublei";
  16.  
  17. }
  18. }
  19.  
  20. }
  21. $numb = new Number();
  22. echo $numb->getNumber(3);
Success #stdin #stdout 0.02s 52432KB
stdin
Standard input is empty
stdout
rublya