I have a PHP Web Application hosted in a site which consumes REST API. I would like to know whether it is possible to host that application in SharePoint? I know you could use Page Viewer Web Part. But then the application should be still hosted on some other site. Is it possible? If not, can any other(programming language) custom based web application be hosted in SharePoint.
The Microsoft stack serves ASPX pages from the IIS server on a Windows machine
PHP is a different technology
You can configure your IIS server to serve PHP pages but it requires PHP to be installed on that Windows server.