How do I create a Linux equation creator?

Hi Team,
I would like to develop a Linux equation creator. I have been trying this using PHP, but I realized that it takes a hell of work to come up with a working one. Is there a way I can get a source code to aid me in this development? This is particularly for Linux. Thanks and be blessed!
