ajf/php4_constructor_finder 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

ajf/php4_constructor_finder

最新稳定版本:1.0

Composer 安装命令:

composer require ajf/php4_constructor_finder

包简介

Finds PHP4-style constructors

README 文档

README

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

What are PHP 4 constructors? These:

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.

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

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.

Installation and Usage

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

Command line usage is finder file1.php file2.php ....

Run the tests with vendor/bin/phpunit --bootstrap vendor/autoload.php src/tests.php.

统计信息

  • 总下载量: 37
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 2
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 2
  • Watchers: 1
  • Forks: 2
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2014-11-18

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固