This simple PHP command allows you to list all loaded PHP extensions along with their versions. It utilizes the ReflectionExtension class to provide detailed information about each extension.
php -r '$all = get_loaded_extensions(); foreach($all as $i) { $ext = new ReflectionExtension($i); $ver = $ext->getVersion(); echo "$i - $ver" . PHP_EOL;}'