PHP code example of web-technologies / yii2-calculator

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

    

web-technologies / yii2-calculator example snippets


<?=Yii::$app->math->expr('( 5 + (5 * 6) - 3 + 4 * 4 ^ 6 + ( -3 * -5 * 4 + ( 3 / 34 + 1 * 3 + 6 - 3 + ( 4 / 2 ) ) ) ) * -1')

php composer.phar 

/config/web.php

'components' => array(
        ...
        'math' => array(
        	 	'class' => 'webtechnologies\calculator\Math',
        		//'handlerClass' => 'namespace/to/customHandlerClass',  //optional parameter
        		),
		    )