nilportugues/php_backslasher
Composer 安装命令:
composer require nilportugues/php_backslasher
包简介
Adds all PHP internal functions to its namespace by adding backslash to them. Improves the application's performance when OPCache is on.
关键字:
README 文档
README
PHP BackSlasher
Tool to add all PHP internal functions and constants to its namespace by adding backslash to them.
Function resolution without the backslash forces the PHP internals to verify for each function call if function or constant belongs to current namespace or the global namespace. With the backslash PHP does not check the current namespace and therefore execution is faster when using OP Cache.
Idea from Nikita Popov talk:
Installation
Use Composer to install the package:
$ composer require --dev nilportugues/php_backslasher
Usage
$ php bin/php_backslasher fix <path/to/directory>
Output
Works for functions in conditional statements, negative conditionals, placed in an array as key or value and any other normal use. Also adds a backslash to defined constants and true, false and null values.
Internal functions and constants
echo strlen('Hello World'); var_dump(null); var_dump(false); echo DIRECTORY_SEPARATOR; return true; // becomes: echo \strlen('Hello World'); \var_dump(\null); \var_dump(\false); echo \DIRECTORY_SEPARATOR; return \true;
Contribute
Contributions to the package are always welcome!
- Report any bugs or issues you find on the issue tracker.
- You can grab the source code at the package's Git repository.
Support
Get in touch with me using one of the following means:
- Emailing me at contact@nilportugues.com
- Opening an Issue
Authors
License
The code base is licensed under the MIT license.
nilportugues/php_backslasher 适用场景与选型建议
nilportugues/php_backslasher 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 9.38k 次下载、GitHub Stars 达 88, 最近一次更新时间为 2015 年 11 月 01 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「performance」 「php」 「git」 「function」 「HOOK」 「optimization」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 nilportugues/php_backslasher 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 nilportugues/php_backslasher 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 nilportugues/php_backslasher 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
g4 application profiler package
CSS/Javascript Minificator, Compressor and Concatenator for TYPO3 - highly configurable frontend asset optimization for CSS/JS merging, minification and compression with optional body parsing, async/defer loading, inline output, data-ignore exclusions, SRI integrity validation/calculation, external
WordPress mu-plugin to remove jQuery Migrate from the list of jQuery dependencies and to allow jQuery to enqueue before </body> instead of in the <head>.
Easily manage git hooks in your composer config
Create link to static resources with cache-breaking segment based on md5 of the file
MediaWiki extension that allows embedding external content, specified by URL, into your wiki pages
统计信息
- 总下载量: 9.38k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 88
- 点击次数: 23
- 依赖项目数: 20
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2015-11-01