In an exercise I did :
<?php
$initial = '555';
$a = octdec($initial);
echo $a . "\n";
$b = deg2rad($a) . "\n";
echo $b;
$c = cos($b). "\n"; *(line 9)*
echo $c;
and it does show the correct answer, as well as an error:
365
6.3704517697793
0.99619469809175
PHP Notice: A non well formed numeric value encountered in /home/ccuser/workspace/hg2pmf/index.php on line 9
if I change line 9 with : $c = cos(6.3704517697793). "\n";
the message of error disappear. Why can't I use the $
inside the cos()
when in deg2rad()
works perfectly?