PHP Undefined Constant PHP_ROUND_HALF_DOWN -
i have php code in project i'm working on uses php's round function. on localhost, don't include quotes around mode argument, stating php_round_half_down. however, when pushing server error message:
use of undefined constant php_round_half_down - assumed 'php_round_half_down' warning (2): wrong parameter count round() [app/views/helpers/time_left.php, line 14]
now, when add single quotes mode argument, first error goes away, "wrong parameter count" remains. i'm calling function follows:
$days = round(($difference/$day), 0, php_round_half_down);
thanks , help!
the rounding mode added in php 5.3. make sure you're running @ least version.
you can see version you're running placing following in php file:
var_dump(phpversion());
Comments
Post a Comment