@Yuval Grinberg , Thank you for posting this good question.
I understand you want to detect the runtime used via CLI (az webapp config show) only, would like to better understand your use-case and CLI only approach.
How to detect what runtime is used for old Win app service based on CLI output only (az webapp config show).
Just to highlight**,** phpVersion and netFrameworkVersion fields are populated for an Azure Web App, it means that the Web App is configured to support both PHP and .NET Framework.
To determine which runtime is being used by the Web App, you can check the Handler Mappings section in the Configuration blade of the Web App in the Azure portal. This section lists the handlers that are configured for the Web App, including the handler for PHP and the handler for .NET Framework.
Just as an example:
If the Web App is using PHP, the Handler Mappings section should include a handler for PHP, such as FastCGI for PHP. If the Web App is using .NET Framework, the Handler Mappings section should include a handler for ASP.NET, such as ASPX-ISAPI-2.0.
Regarding the netFrameworkVersion
field, you are correct that it is always populated by default for every App Service. However, if the Web App is using .NET Framework, the netFrameworkVersion field should be set to the version of .NET Framework that the Web App is using, such as v4.0. If the netFrameworkVersion field is set to v2.0 or v3.5, it may indicate that the Web App is using an older version of .NET Framework.
See #configure-handler-mappings
Please let us know, I'll follow-up shortly.