Reputation: 1110
Here is My code bcmul is undefined but my concern bcmul is php function using for Multiply two arbitrary precision numbers. but laravel show undefined why?
public function confirmBtcRequest(Request $request,$id){
$getBalanceInfo = $this->bitcoin->get_balance();
$sendAmount = bcmul($getBalanceInfo->data->available_balance, '0.01', 8);
print_r($sendAmount);
die;
}
if You have any idea please respond me.
Upvotes: 8
Views: 10888
Reputation: 1833
According to PHP documentation, BCMath is not available by default with PHP7 on Linux servers.
bcmath ist not installed automatically with php 7 on linux (ubuntu server) You have to use: sudo apt-get install php-bcmath
Please install it using apt-get: sudo apt-get install php-bcmath
Source: http://php.net/manual/en/bc.installation.php
Upvotes: 24
Reputation: 1570
bcmul() is a function in php. This error means that the php version on your server has not been compiled with the necessary library, called BC Math (http://php.net/manual/en/book.bc.php). You need to talk to your server admin about this.
Upvotes: 4