function degree var var int var while true var int floor var var var i

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
function degree($var)
{
$var = (int) $var;
while (true)
{
$var = (int) floor($var/2);
$a = $var % 2;
$b = $var / 2;
if ($a == 1 || $b == 1)
{
break;
}
}
if ($var == 2)
{
return true;
}
else
{
return false;
}
}