I am working on a website with PHP as backend. There are things from the front-end which I'd like to accomplish using AJAX calls.
Which of these methods should I use to design them and why?
Call to different PHP files for different uses
Call to the same PHP file, with instructions on what to do
A RESTful API
Any other better way?