I want to develop one simple api using php.
My functionality is that if some one enter some required values then they will get calculation result from the algorithm
The best and easiest way is to use frameworks and tools.
I use APIATO (https://github.com/apiato/apiato) it's a flawless framework for building scalable and testable API-Centric Apps with PHP and Laravel.
Check it out.