This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| function ceil_plus($value, $precision = 1) { | |
| return round($value + 0.5 * pow(0.1, $precision), $precision, PHP_ROUND_HALF_DOWN); | |
| } | |
| function floor_plus($value, $precision = 1) { | |
| return round($value - 0.5 * pow(0.1, $precision), $precision, PHP_ROUND_HALF_UP); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ## Create a source directory | |
| ## mkdir /usr/src/php7 | |
| ## cd /usr/src/php7 | |
| ## copy this files as /usr/src/php7/install.sh | |
| ## aria2c https://gist.githubusercontent.com/risyasin/92075324caa9a46bfd5c/raw/83e0851c42afc4f3557bc4aea02197ddf92fed73/centos-php7-install.sh | |
| ## php7 compile requirements | |
| dnf install -y git | |
| dnf install -y gcc bison automake autoconf |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| if (!function_exists('bcsub')) { | |
| echo "install bcmath\nredhat: yum install php-bcmath\n"; | |
| exit; | |
| } | |
| $a = '1.11111112'; | |
| $b = '1.11111111'; |