diff --git a/core/modules/system/src/Controller/SystemInfoController.php b/core/modules/system/src/Controller/SystemInfoController.php
index c6d99242282a45f0bce3e797e46b032bafc79195..7ba496bf4fc1276870b91379dd879d2d99a8c0ae 100644
--- a/core/modules/system/src/Controller/SystemInfoController.php
+++ b/core/modules/system/src/Controller/SystemInfoController.php
@@ -62,7 +62,7 @@ public function status() {
   public function php() {
     if (function_exists('phpinfo')) {
       ob_start();
-      phpinfo();
+      phpinfo(~ (INFO_VARIABLES | INFO_ENVIRONMENT));
       $output = ob_get_clean();
     }
     else {