https://github.com/nilportugues/php-forbidden-functions
[Git hook] Command line to look for functions that should be avoided
https://github.com/nilportugues/php-forbidden-functions
ci composer forbidden-functions git git-hook git-hooks php php7 quality quality-assurance
Last synced: 4 months ago
JSON representation
[Git hook] Command line to look for functions that should be avoided
- Host: GitHub
- URL: https://github.com/nilportugues/php-forbidden-functions
- Owner: nilportugues
- License: mit
- Created: 2015-11-05T18:21:42.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2016-03-06T10:13:05.000Z (over 9 years ago)
- Last Synced: 2025-07-09T05:03:32.027Z (4 months ago)
- Topics: ci, composer, forbidden-functions, git, git-hook, git-hooks, php, php7, quality, quality-assurance
- Language: PHP
- Homepage: http://nilportugues.com
- Size: 26.4 KB
- Stars: 10
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
# PHP Forbidden Functions
[](https://scrutinizer-ci.com/g/nilportugues/php_forbidden_functions/?branch=master) [](https://insight.sensiolabs.com/projects/ba34c91a-4ee4-4b0d-8c7c-8ad3019a6fcc) [](https://packagist.org/packages/nilportugues/php_forbidden) [](https://packagist.org/packages/nilportugues/php_forbidden) [](https://packagist.org/packages/nilportugues/php_forbidden)
[](https://paypal.me/nilportugues)
Why? Because someone should look for forbidden functions that should be avoided in production.
Typical examples are `print_r`, `var_dump`, `exit` and `die` function calls.
## Installation
Use [Composer](https://getcomposer.org) to install the package:
```
$ composer require --dev nilportugues/php_forbidden
```
## Usage
It is really this simple:
```
$ php bin/php_forbidden check
```
```
$ php bin/php_forbidden check
```
You can also pipe STDIN in, if you want to use this tool with Gulp for instance:
```
$ cat | php bin/php_forbidden check
```
which means that this also works writing code directly from the shell (if you have some reason to do it):
```
$ php bin/php_forbidden check
- Opening an [Issue](https://github.com/nilportugues/php_forbidden_functions/issues/new)
## Authors
* [Nil Portugués Calderó](http://nilportugues.com)
* [The Community Contributors](https://github.com/nilportugues/php_forbidden_functions/graphs/contributors)
## License
The code base is licensed under the [MIT license](LICENSE).