<?php
class Number {
public $number;
public function __construcnt(){
$this->number = $number;
}
public function getNumber($number){
switch($number){
case $number == 1:
return "ruble";
case $number == 2 || $number == 3 || $number == 4:
return "rublya";
case $number == 5 || $number == 6 || $number == 7 || $number == 8 || $number == 9:
return "rublei";
}
}
}
$numb = new Number();
echo $numb->getNumber(3);
PD9waHAKCmNsYXNzIE51bWJlciB7CglwdWJsaWMgJG51bWJlcjsKCXB1YmxpYyBmdW5jdGlvbiBfX2NvbnN0cnVjbnQoKXsKCQkkdGhpcy0+bnVtYmVyID0gJG51bWJlcjsKCX0KCXB1YmxpYyBmdW5jdGlvbiBnZXROdW1iZXIoJG51bWJlcil7CgkJc3dpdGNoKCRudW1iZXIpewoJCWNhc2UgJG51bWJlciA9PSAxOgoJCQlyZXR1cm4gInJ1YmxlIjsKCQkJY2FzZSAkbnVtYmVyID09IDIgfHwgJG51bWJlciA9PSAzIHx8ICRudW1iZXIgPT0gNDoKCQkJCXJldHVybiAicnVibHlhIjsKCQkJCWNhc2UgJG51bWJlciA9PSA1IHx8ICRudW1iZXIgPT0gNiB8fCAkbnVtYmVyID09IDcgfHwgJG51bWJlciA9PSA4IHx8ICRudW1iZXIgPT0gOToKCQkJCQlyZXR1cm4gInJ1YmxlaSI7CgkJCQkJCgl9Cgl9CgkKCX0KCSRudW1iID0gbmV3IE51bWJlcigpOwoJZWNobyAkbnVtYi0+Z2V0TnVtYmVyKDMpOw==