Download the PHP package nikic/php-parser without Composer

On this page you can find all versions of the php package nikic/php-parser. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.


After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?
Rate from 1 - 5
Rated 5.00 based on 1 reviews

All versions of php-parser with dependencies

Informations about the package php-parser

PHP Parser

Coverage Status

This is a PHP 5.2 to PHP 8.1 parser written in PHP. Its purpose is to simplify static code analysis and manipulation.

Documentation for version 5.x (in development; for running on PHP >= 7.1; for parsing PHP 7.0 to PHP 8.2, with limited support for parsing PHP 5.x).

Documentation for version 4.x (stable; for running on PHP >= 7.0; for parsing PHP 5.2 to PHP 8.1).

Documentation for version 3.x (unsupported; for running on PHP >= 5.5; for parsing PHP 5.2 to PHP 7.2).


The main features provided by this library are:

Quick Start

Install the library using composer:

php composer.phar require nikic/php-parser

Parse some PHP code into an AST and dump the result in human-readable form:

This dumps an AST looking something like this:

Let's traverse the AST and perform some kind of modification. For example, drop all function bodies:

This gives us an AST where the Function_::$stmts are empty:

Finally, we can convert the new AST back to PHP code:

This gives us our original code, minus the var_dump() call inside the function:

For a more comprehensive introduction, see the documentation.


  1. Introduction
  2. Usage of basic components

Component documentation:

Requires php Version >=7.0
ext-tokenizer Version *

The package nikic/php-parser contains the following files

Loading the files please wait ....