FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » JavaScript to PHP
Show: Today's Messages :: Unread Messages :: Polls :: Message Navigator
| Subscribe to topic | Bookmark topic 
Switch to threaded view of this topic Create a new topic Submit Reply
JavaScript to PHP [message #185019] Mon, 24 February 2014 11:02 Go to next message
Stan Weiss is currently offline  Stan Weiss
Messages: 3
Registered: October 2011
Karma: 0
Junior Member
add to buddy list
ignore all messages by this user
Over the years I have written a number of JavaScript. The past couple of
years I have been rewriting a few in PHP. I do not have any good PHP
reference material. Can someone help me out. What would I replace
Math.POW with?

ans1 = c7 + c8 + c9 + c10 + c11
c12 = ( Math.pow(10.0, ans1))

Thanks,
Stan
Message by Christoph Michael Bec is ignored  [reveal message]  [reveal all messages by Christoph Michael Bec]  [stop ignoring this user] Go to previous messageGo to next message
Re: JavaScript to PHP [message #185023 is a reply to message #185020] Mon, 24 February 2014 12:27 Go to previous messageGo to next message
Thomas 'PointedEars'  is currently offline  Thomas 'PointedEars'
Messages: 701
Registered: October 2010
Karma: 0
Senior Member
add to buddy list
ignore all messages by this user
Christoph Michael Becker wrote:

> Stan Weiss wrote:
>> Can someone help me out. What would I replace
>> Math.POW with?
>>
>> ans1 = c7 + c8 + c9 + c10 + c11
>> c12 = ( Math.pow(10.0, ans1))
>
> Just use the pow() function.[2] Since PHP 5.6 there's even an operator
> (**) available.[3]

The latest stable PHP version is 5.5.9. [1] PHP 5.6.0*alpha2* was released
on 2014-02-13. [2] It is not a good idea to speak of future software
versions as something that is carved in stone.

[1] <http://php.net/downloads>
[2] <http://php.net/>

> [2] <https://wiki.php.net/rfc/pow-operator>

You got your footnotes mixed.


PointedEars
--
Anyone who slaps a 'this page is best viewed with Browser X' label on
a Web page appears to be yearning for the bad old days, before the Web,
when you had very little chance of reading a document written on another
computer, another word processor, or another network. -- Tim Berners-Lee
Message by Christoph Michael Bec is ignored  [reveal message]  [reveal all messages by Christoph Michael Bec]  [stop ignoring this user] Go to previous messageGo to next message
Re: JavaScript to PHP [message #185098 is a reply to message #185020] Wed, 26 February 2014 09:36 Go to previous message
Stan Weiss is currently offline  Stan Weiss
Messages: 3
Registered: October 2011
Karma: 0
Junior Member
add to buddy list
ignore all messages by this user
Christoph,
Thank You.

Stan


Christoph Michael Becker wrote:
>
> Stan Weiss wrote:
>
>> Over the years I have written a number of JavaScript. The past couple of
>> years I have been rewriting a few in PHP. I do not have any good PHP
>> reference material.
>
> Well, you can use the PHP manual.[1]
>
>> Can someone help me out. What would I replace
>> Math.POW with?
>>
>> ans1 = c7 + c8 + c9 + c10 + c11
>> c12 = ( Math.pow(10.0, ans1))
>
> Just use the pow() function.[2] Since PHP 5.6 there's even an operator
> (**) available.[3]
>
> [1] <http://www.php.net/manual/>
> [1] <http://www.php.net/manual/function.pow.php>
> [2] <https://wiki.php.net/rfc/pow-operator>
>
> --
> Christoph M. Becker
Quick Reply
Formatting Tools:   
  Switch to threaded view of this topic Create a new topic
Previous Topic: PHP script to get name of file which houses the script?
Next Topic: Completely stumped
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Sun Apr 20 15:48:39 EDT 2025

Total time taken to generate the page: 0.05026 seconds