PHP Error on this host?

Status
Not open for further replies.

quickmanx262

New Member
Messages
27
Reaction score
0
Points
1
Hi all,

Today I wrote a small PHP script to do some number crunching for me. At 64 lines, it is well beyond what I'd consider "small"... but for some reason, it doesn't work. This isn't a "help me with my code" thread, because I know the code is good - I've tested it on another server and it loads fine and does proper math.

Is there some sort of error with PHP on this host? I've never had trouble with any pre-written PHP scripts such as web forums, but this is the second time something I've written doesn't work here, yet works elsewhere. I'm starting to wonder if something is disabled in php.ini or the php version here is crippled in some way.

Answers appreciated.
 

quickmanx262

New Member
Messages
27
Reaction score
0
Points
1
Going to reply to my own thread here to provide a little more information after much more testing done to a working script than should have to be done:

$finalVal = round(1/(10**($combVal/400), 2, PHP_ROUND_HALF_UP));

is where this page fails. If I comment that out, it works... But this is the meat of what I want to do. What I know so far is ** does not parse as exponent and stops the page. Is this server not running PHP later than 5.6? Even replacing ** with pow() does nothing.
 

caftpx10

Well-Known Member
Messages
1,534
Reaction score
114
Points
63
I know, response is a tad late.
It's causing a syntax error. Did you mean:
PHP:
$finalVal = round(1/(10**($combVal/400)), 2, PHP_ROUND_HALF_UP);
 
Status
Not open for further replies.
Top