How To Install Phpmd In Debian, Ubuntu, Kali, Fedora And Raspbian?

How To Install Phpmd In Debian, Ubuntu, Kali, Fedora And Raspbian?

phpmd

A PHP mess detector that checks for common potential problems.

Maintainer: Debian PHP PEAR Maintainers


Website: http://phpmd.org

Section: php

Install phpmd

  • Debian apt-get install phpmd Click to copy
  • Ubuntu apt-get install phpmd Click to copy
  • Kali Linux apt-get install phpmd Click to copy
  • Fedora dnf install phpmd Click to copy
  • Raspbian apt-get install phpmd Click to copy

A PHP mess detector that checks for common potential problems.

How to use phpmd?

Below are few example commands for phpmd that you can use in the terminal.

Display a list of available rulesets and formats:
phpmdClick to copy
Scan a file or directory for problems using comma-separated rulesets:
phpmd path/to/file_or_directory xml|text|html rulesetsClick to copy
Specify the minimum priority threshold for rules:
phpmd path/to/file_or_directory xml|text|html rulesets --minimumpriority priorityClick to copy
Include only the specified extensions in analysis:
phpmd path/to/file_or_directory xml|text|html rulesets --suffixes extensionsClick to copy
Exclude the specified comma-separated directories:
phpmd path/to/file_or_directory xml|text|html rulesets --exclude directory_patternsClick to copy
Output the results to a file instead of stdout:
phpmd path/to/file_or_directory xml|text|html rulesets --reportfile path/to/report_fileClick to copy
Ignore the use of warning-suppressive PHPDoc comments:
phpmd path/to/file_or_directory xml|text|html rulesets --strictClick to copy
Installing phpmd command is simple. just copy one of the above commands for your operating system and paste it into terminal. This command is available for Debian, Ubuntu, Kali, Fedora and Raspbian operating systems. Once you run the command it will install the latest version of phpmd 2026 package in your OS.