Home > Backend Development > PHP Tutorial > Two ** in PHP can directly find the nth power of a number. Why is there still a pow() function?

Two ** in PHP can directly find the nth power of a number. Why is there still a pow() function?

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-09-30 09:37:30
Original
1506 people have browsed it

<code>$a = 2**6;
echo $a;
$b = pow(2,6);
echo $b;</code>
Copy after login
Copy after login

?>

Reply content:

<code>$a = 2**6;
echo $a;
$b = pow(2,6);
echo $b;</code>
Copy after login
Copy after login

?>

You have to look at when this operator was implemented

https://wiki.php.net/rfc/pow-...

Because it needs to be backward compatible

Related labels:
php
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Issues
PHP-Datenerfassung?
From 1970-01-01 08:00:00
0
0
0
pemerolehan data php?
From 1970-01-01 08:00:00
0
0
0
PHP 데이터 수집?
From 1970-01-01 08:00:00
0
0
0
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template