PHP code example of komputronika / kalkulator

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

    

komputronika / kalkulator example snippets




omputronika\Kalkulator\Kalkulator;

$o = new Kalkulator;

echo "<html><body style='margin:30px;font-family:sans-serif;font-size:1.25rem'>";

echo "<h3>Demo Kalkulator dengan Composer</h3>";
echo "<pre>";
echo "100 + 5 = ". $o->tambah(100,5)."<br/>";
echo "100 - 5 = ". $o->kurang(100,5)."<br/>";
echo "100 * 5 = ". $o->kali(100,5)."<br/>";
echo "100 / 5 = ". $o->bagi(100,5);
echo "</pre>";
echo "</body></html>";

.
├── composer.json
├── composer.lock
├── index.php
└── vendor
    ├── autoload.php
    ├── bin
    ├── composer
    ├── komputronika
    ├── phpunit
    ├── sebastian
    └── symfony