PHP code example of haganjones / sumy

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

    

haganjones / sumy example snippets


$sumy = new Sumy();
$sumy->add(100)->divide(2);
 
$sumy->get(); // 50

composer 

$sumyOne = new Sumy();
$sumyOne->get(); // 0
 
$sumyTwo = new Sumy(100);
$sumyTwo->get(); // 100
 
$sumyThree = new Sumy($sumyTwo);
$sumyThree->get() // 100

$sumy = new Sumy(1000);
$sumy->add(140)->get(); // 1140

$sumy = new Sumy(100);
$sumy->add(400)->mulitply(4)->divide(2)->subtract(39)->sqrt()->pow(3);
 
$sumy->get(); //29791