PHP Info

Stay organized with collections Save and categorize content based on your preferences.

Get PHP info

Explore further

For detailed documentation that includes this code sample, see the following:

Code sample


use Psr\Http\Message\ServerRequestInterface;

function phpInfoDemo(ServerRequestInterface $request): string
    // phpinfo() displays its output directly in the function's
    // HTTP response, so we don't need to explicitly return it
    // Note: we recommend deleting the deployed Cloud Function once you no
    // longer need it, as phpinfo() may broadcast potential security issues.
    return '';

What's next

To search and filter code samples for other Google Cloud products, see the Google Cloud sample browser.