From c62bcb88cee9dd327d76253644c446c7f52928f6 Mon Sep 17 00:00:00 2001 From: "Hahn Axel (hahn)" <axel.hahn@unibe.ch> Date: Mon, 3 Mar 2025 17:14:23 +0100 Subject: [PATCH] Binay can show compiled PHP modules with -m --- src/amcli.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/amcli.php b/src/amcli.php index 1d1d8d8..b9b4e19 100755 --- a/src/amcli.php +++ b/src/amcli.php @@ -90,6 +90,7 @@ OPTIONS: -h, --help Print this help and exit -i, --ini Set an INI File to parse -l, --list list available checks and exit; --ini will be ignored + -m, --modules list available Php modules in this binary -v, --verbose Verbose output -V, --version Show version and exit @@ -141,6 +142,15 @@ if (isset($ARGS['-l']) || isset($ARGS['--list'])) { exit(0); } +// show builtin modules +if (isset($ARGS['-m']) || isset($ARGS['--modules'])) { + _wd("Showing php modules"); + $aMods=get_loaded_extensions(); + sort($aMods); + echo implode("\n", $aMods); + exit(0); +} + $inifile = $ARGS["--ini"] ?? ($ARGS["-i"] ?? ""); if (!$inifile) { echo "ERROR: Set an INI File using -i=<FILE> (or --ini=<FILE>).\n"; -- GitLab