-4

The following code:

5 ** 2

results in this error:

PHP Parse error:  syntax error, unexpected '*'

And I have no idea why. Can anyone help me?

Solver
  • 51
  • 1
  • 9

2 Answers2

0

Use pow() function. Get returned value of pow(5,2)

http://www.php.net/manual/pt_BR/function.pow.php

fntneves
  • 394
  • 2
  • 6
0

You are doing this:

5 ** 2

When you should be doing this in PHP using the pow() function:

echo pow(5,2);
Giacomo1968
  • 25,759
  • 11
  • 71
  • 103