Your code could work as expect on my side. I just created a new Azure Web Apps Service and create one single PHP script with your example code, it worked fine.
You can try to change display_errors
to On
in custom PHP build-in runtime to show your PHP errors. As a product env for PHP application, this setting is closed by default. You can refer to How to: Change the built-in PHP configurations for details.
And as I find you have added the tag cakephp
, so if your PHP application is built in a framework, you can try to check whether the dependencies are completely installed.
You can login the KUDU console site of your Azure Web Apps service to modify the files, or install composer extension at the site extension tab. The Kudu console site's URL should be like:https://<your_site_name>.scm.azurewebsites.net/DebugConsole
Additionally, you can leverage Visual Studio Online, which is an online editor enable you to manage and develop your application on Azure App Service to edit and manage your application on Azure. refer to the answer of Visual Studio 2015 and Microsoft Azure syncing files, Server/Local to see how to enable this setting.