PHP code example of sujalpatel / calculator

1. Go to this page and download the library: Download sujalpatel/calculator 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/ */

    

sujalpatel / calculator example snippets

 php
use Sujalpatel\Calculator\Calculator;

public function addition()
{
    return Calculator::add(5,5); // Answer: 5 + 5 = 5
}
 php
use Sujalpatel\Calculator\Calculator;

public function multiplication()
{
    return Calculator::multi(2,5); // Answer: 2 * 5 = 10
}