Need help with tokenizer?
Click the “chat” button below for chat support from the developer who created it, or find similar developers for support.

About the developer

theseer
4.6K Stars 18 Forks Other 41 Commits 2 Opened issues

Description

A small library for converting tokenized PHP source code into XML (and potentially other formats)

Services available

!
?

Need anything else?

Contributors list

No Data

Tokenizer

A small library for converting tokenized PHP source code into XML.

Scrutinizer Code Quality Code Coverage Build Status

Installation

You can add this library as a local, per-project dependency to your project using Composer:

composer require theseer/tokenizer

If you only need this library during development, for instance to run your project's test suite, then you should add it as a development-time dependency:

composer require --dev theseer/tokenizer

Usage examples

$tokenizer = new TheSeer\Tokenizer\Tokenizer();
$tokens = $tokenizer->parse(file_get_contents(__DIR__ . '/src/XMLSerializer.php'));

$serializer = new TheSeer\Tokenizer\XMLSerializer(); $xml = $serializer->toXML($tokens);

echo $xml;

The generated XML structure looks something like this:


 
  <?php 
  declare
  (
  strict_types
   
  =
   
  1
  )
  ;
 

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.