Download the PHP package k6xiao/strtobcmath without Composer

On this page you can find all versions of the php package k6xiao/strtobcmath. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package strtobcmath

StrToBcmath

介绍

StrToBcmath 是一个 PHP 类,用于将字符串表达式转换为 BcMath 计算结果。它支持复杂的“加、减、乘、除、指数”运算,支持括号优先级。

为什么要使用这个库?

对于需要精确结果的计算,我们通常会选择使用 BcMath 来避免小数带来的误差。然而,对于复杂的计算,BcMath 的表达方式可能会显得不够直观和易读。使用这个库,你可以将直观且易读的运算表达式转换为 BcMath 的计算结果。这样,你不仅可以确保结果的精度,还能保持代码的高度可读性,节省编写代码的时间,同时避免在编写 BcMath 时可能出现的错误。

安装说明

将 StrToBcmath.php 文件复制到你的项目中,并在需要使用的地方引入。

也可以使用 composer require k6xiao/strtobcmath 来安装这个库, 然后使用 use k6xiao\StrToBcmath; 引入该库。

使用说明

  1. 首先,创建一个 StrToBcmath 对象。你可以在创建对象时设置精度和是否输出计算过程。

  2. 然后,使用 of 方法计算表达式的结果。

示例

以下是一些使用 StrToBcmath 的示例:

这将输出每个表达式的计算过程和结果:

注意

StrToBcmath 类使用 PHP 的 bcmath 库进行计算,所以你的 PHP 环境需要支持 bcmath 库。

项目源代码

你可以在以下地址找到我们的项目源代码:

项目计划

  1. 增加取余运算:$num1 % $num2 ~~~ fmod(float $num1, float $num2)
  2. 建立讨论组,与有兴趣的伙伴一起维护、计划
  3. 对于乘法表达式():兼容‘x’号、省略‘’号的优化。

All versions of strtobcmath with dependencies

PHP Build Version
Package Version
No informations.
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package k6xiao/strtobcmath contains the following files

Loading the files please wait ....