2017 © Pedro Peláez
 

library php4_constructor_finder

Finds PHP4-style constructors

image

ajf/php4_constructor_finder

Finds PHP4-style constructors

  • Tuesday, November 18, 2014
  • by ajf
  • Repository
  • 1 Watchers
  • 2 Stars
  • 15 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 2 Forks
  • 1 Open issues
  • 2 Versions
  • 7 % Grown

The README.md

PHP 4 Constructor Finder

Name says it all. It's a tiny little PHP script that uses Nikita Popov's PHP-Parser to find PHP 4 constructors., (*1)

What are PHP 4 constructors? These:, (*2)

class Bar {
    public function Bar() {
    }
}

If you didn't know (oh dear god), the modern way to make a constructor is public function __construct() - but for backwards-compatibility, we keep around this thing where a function with the same name of the class is magically a constructor. Yuck., (*3)

This is a problem, because what if you make a class called Filter with a method called filter? Uh-oh., (*4)

So, Levi Morrison wrote an RFC to get rid of this, and I wrote this at his request. It finds PHP4 constructors. That's it, really., (*5)

Installation and Usage

For development, composer install in the checked-out repo. For normal use, composer install -g ajf/PHP4_Constructor_Finder., (*6)

Command line usage is finder file1.php file2.php ...., (*7)

Run the tests with vendor/bin/phpunit --bootstrap vendor/autoload.php src/tests.php., (*8)

The Versions

18/11 2014

dev-master

9999999-dev https://github.com/TazeTSchnitzel/PHP4_Constructor_Finder

Finds PHP4-style constructors

  Sources   Download

MIT

The Requires

 

The Development Requires

18/11 2014

1.0

1.0.0.0 https://github.com/TazeTSchnitzel/PHP4_Constructor_Finder

Finds PHP4-style constructors

  Sources   Download

MIT

The Requires

 

The Development Requires