Download the PHP package bhittani/php-parser without Composer
On this page you can find all versions of the php package bhittani/php-parser. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download bhittani/php-parser
More information about bhittani/php-parser
Files in bhittani/php-parser
Package php-parser
Short Description Syntax parser with back porting down to previous versions.
License MIT
Homepage http://github.com/kamalkhan/php-parser
Informations about the package php-parser
PHP Parser
Syntax parser with back porting down to previous versions.
This library contains custom traversal visitors for use with nikic/PHP-Parser.
Table of contents
- Table of contents
- Install
- Usage
- Group import to individual imports
- Splat calls to call_user_func_array
- Class constants to strings
- Variadic to func_get_args
- Remove imports
- Append suffix
- Test
- Credits
- License
Install
This library may be consumed by using composer.
In your terminal, run:
Usage
To utilize this library make sure you understand how nikic/PHP-Parser parses code.
This library contains a set of node visitors to manipulate php code.
Group import to individual imports
Back ports php 7+ syntax code.
which will convert
into
Splat calls to call_user_func_array
Back ports php 5.6+ syntax code.
which will convert
into
Class constants to strings
Back ports php 5.5+ syntax code.
which will convert
into
Variadic to func_get_args
Back ports php 5.6+ syntax code.
which will convert
into
Remove imports
Removes all import statements.
which will remove all
use
statements.
Append suffix
Appends a suffix to all imports, classes, traits, and interfaces.
which will convert
into
Notice that php's built-in entities won't be suffixed.
Test
Make sure you first CD into the library's root directory.
Do a composer install.
Run the tests.
or
Credits
This library would not be possible without making use of nikic/PHP-Parser.
License
This library is released under the MIT License.