PHP CLI Calculator Class: Perform calculations with values from the console

Recommend this page to a friend!
  Info   View files Example   View files View files (4)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
Not yet rated by the usersTotal: 130 All time: 9,120 This week: 258Up
Version License PHP version Categories
php-cli-calculator-c 1.0MIT/X Consortium ...5PHP 5, Console, Math
Description Author

This class can perform calculations with values from the console.

It can read the user input from the shell console to perform several types of math operations.

First the class reads the input to take one letter that defines which operation will be performed.

Then the class calls the respective operation function to take additional parameters to perform the specified math operation.

Currently it can perform the operations: addition, subtraction, multiplication, division, remainder and percentage.

Innovation Award
PHP Programming Innovation award nominee
October 2018
Number 9
Sometimes it is necessary to perform simple math calculations.

This class allows users to make calculations on a command line console using a simple script that uses the class.

Manuel Lemos
Picture of Muhammad Umer Farooq
Name: Muhammad Umer Farooq <contact>
Classes: 46 packages by
Country: Pakistan Pakistan
Innovation award
Innovation award
Nominee: 4x

Details

PHP CLI Calculator Class

Its my own implementation of calculator using php-cli Support many feature.. 1. Addition 2. subtraction 3. Average 4. Multiplication and much more

Requirement

  • PHP

How to use

just type command in terminal `php CAL` then follow the instruction

  Files folder image Files  
File Role Description
Files folder imageclass (1 file)
Accessible without login Plain text file CAL Example Example script
Accessible without login Plain text file LICENSE Lic. License text
Accessible without login Plain text file readme.md Doc. Documentation

  Files folder image Files  /  class  
File Role Description
  Plain text file CliCalculator.php Class Class source

 Version Control Unique User Downloads Download Rankings  
 100%
Total:130
This week:0
All time:9,120
This week:258Up

For more information send a message to info at phpclasses dot org.