Skip to content

Finds files using PHP4-style constructors in a specified directory

Notifications You must be signed in to change notification settings

rzumstein/php4-constructor-detector

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 

Repository files navigation

PHP4 Constructor Detector

Description

Finds PHP classes that use the PHP4 constructor style that is now deprecated in PHP5 when using namespaces, and completely deprecated in PHP7. Useful for checking if your codebase uses PHP4 constructors when upgrading PHP.

Use

Clone this repo or download pcd.py. Run the script by providing a directory to scan for PHP files, e.g.:

python3 pcd.py /path/to/src/

To run recursively:

python3 pcd.py -r /path/to/src/

To ignore subdirectories, pass them to --ignore as a comma-separated list:

python3 pcd.py -r -i /path/to/src/subdir1,/path/to/src/subdir2 /path/to/source

Supported Platforms

  • Windows
  • OS X
  • Linux

About

Finds files using PHP4-style constructors in a specified directory

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages