Lecture
A right-associative operator ** was added to denote exponentiation. The short syntax ** = is also available.
<? php
printf ("2 ** 3 ==% d \ n", 2 ** 3);
printf ("2 ** 3 ** 2 ==% d \ n", 2 ** 3 ** 2);
$ a = 2;
$ a ** = 3;
printf ("a ==% d \ n", $ a);
?>
The result of this example:
2 ** 3 == 8 2 ** 3 ** 2 == 512 a == 8
Comments
To leave a comment
Running server side scripts using PHP as an example (LAMP)
Terms: Running server side scripts using PHP as an example (LAMP)