PHP code example of php-addons / bc-assert
1. Go to this page and download the library: Download php-addons/bc-assert library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
php-addons / bc-assert example snippets
use PhpAddons\BcAssert\Assert;
class Money
{
public function __construct(string $value)
{
Assert::bcGreaterThan($value, '0', 'The money must be a positive number. Got: %s', 2);
}
}
shell script
composer