Jump to content

What does the ^ carrot do?


etingwall

Recommended Posts

I've searched Google and the forums for this.

 

What does the "^" carrot do in php?

 

I had:

$ans = 0.27 * ($base^0.25)

 

and was getting bogus numbers for $ans.

 

Changing to pow() solved my problem, but I'm curious as to what ^ does.

 

I also have multiple conditional statements such as if($var > 10^10)

 

Are those legitimate, or do I need to us pow()?

 

Thanks.

Link to comment
https://forums.phpfreaks.com/topic/142522-what-does-the-carrot-do/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.