2017 © Pedro Peláez
 

library php_backslasher

Adds all PHP internal functions to its namespace by adding backslash to them. Improves the application's performance when OPCache is on.

image

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.

  • Tuesday, September 12, 2017
  • by nilportugues
  • Repository
  • 3 Watchers
  • 55 Stars
  • 8,513 Installations
  • PHP
  • 20 Dependents
  • 0 Suggesters
  • 5 Forks
  • 4 Open issues
  • 11 Versions
  • 1 % Grown

The README.md

Build Status Scrutinizer Code Quality SensioLabsInsight Latest Stable Version Total Downloads License Donate, (*1)

PHP BackSlasher

Tool to add all PHP internal functions and constants to its namespace by adding backslash to them., (*2)

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., (*3)

Idea from Nikita Popov talk: - PHP 7 – What changed internally? (PHP Barcelona 2015) (slide 72), (*4)

Installation

Use Composer to install the package:, (*5)

$ 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., (*6)

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!, (*7)

Support

Get in touch with me using one of the following means:, (*8)

Authors

License

The code base is licensed under the MIT license., (*9)

The Versions

12/09 2017

dev-master

9999999-dev http://nilportugues.com

Adds all PHP internal functions to its namespace by adding backslash to them. Improves the application's performance when OPCache is on.

  Sources   Download

MIT

The Requires

 

The Development Requires

function hook git php opcache performance optimization namespace namespaces fixer backflash nikita micro-optimization

11/11 2015

1.1.2

1.1.2.0 http://nilportugues.com

Adds all PHP internal functions to its namespace by adding backslash to them. Improves the application's performance when OPCache is on.

  Sources   Download

MIT

The Requires

 

The Development Requires

function hook git php opcache performance optimization namespace namespaces fixer backflash nikita micro-optimization

11/11 2015

1.1.1

1.1.1.0 http://nilportugues.com

Adds all PHP internal functions to its namespace by adding backslash to them. Improves the application's performance when OPCache is on.

  Sources   Download

MIT

The Requires

 

The Development Requires

function hook git php opcache performance optimization namespace namespaces fixer backflash nikita micro-optimization

10/11 2015

1.1.0

1.1.0.0 http://nilportugues.com

Adds all PHP internal functions to its namespace by adding backslash to them. Improves the application's performance when OPCache is on.

  Sources   Download

MIT

The Requires

 

The Development Requires

function hook git php opcache performance optimization namespace namespaces fixer backflash nikita micro-optimization

05/11 2015

1.0.2

1.0.2.0 http://nilportugues.com

Adds all PHP internal functions to its namespace by adding backslash to them. Improves the application's performance when OPCache is on.

  Sources   Download

MIT

The Requires

 

The Development Requires

function php opcache performance optimization namespace namespaces fixer backflash nikita micro-optimization

04/11 2015

1.0.1

1.0.1.0 http://nilportugues.com

Adds all PHP internal functions to its namespace by adding backslash to them. Improves the application's performance when OPCache is on.

  Sources   Download

MIT

The Requires

 

The Development Requires

function php opcache performance optimization namespace namespaces fixer backflash nikita micro-optimization

04/11 2015

1.0.0

1.0.0.0 http://nilportugues.com

Adds all PHP internal functions to its namespace by adding backslash to them. Improves the application's performance when OPCache is on.

  Sources   Download

MIT

The Requires

 

The Development Requires

function php opcache performance optimization namespace namespaces fixer backflash nikita micro-optimization

03/11 2015

0.2.2

0.2.2.0 http://nilportugues.com

Adds all PHP internal functions to its namespace by adding backslash to them. Improves the application's performance when OPCache is on.

  Sources   Download

MIT

The Requires

 

The Development Requires

function php opcache performance optimization namespace namespaces fixer backflash nikita micro-optimization

02/11 2015

0.2.0

0.2.0.0 http://nilportugues.com

Adds all PHP internal functions to its namespace by adding backslash to them. Improves the application's performance when OPCache is on.

  Sources   Download

MIT

The Requires

 

The Development Requires

function php opcache performance optimization namespace namespaces fixer backflash nikita micro-optimization

02/11 2015

0.2.1

0.2.1.0 http://nilportugues.com

Adds all PHP internal functions to its namespace by adding backslash to them. Improves the application's performance when OPCache is on.

  Sources   Download

MIT

The Requires

 

The Development Requires

function php opcache performance optimization namespace namespaces fixer backflash nikita micro-optimization

02/11 2015

0.1.0

0.1.0.0 http://nilportugues.com

Adds all PHP internal functions to its namespace by adding backslash to them. Improves the application's performance when OPCache is on.

  Sources   Download

MIT

The Requires

 

The Development Requires

function php opcache performance optimization namespace namespaces fixer backflash nikita micro-optimization