PHP is a html template engine, so using it to create an API sounds like "The wrong way" by definition. I think you actually need these frameworks in PHP to turn it into something other than a template engine. They recompile your code, change the way it is loaded and accessed via HTTP, it's a whole different way to use the language and runtime.