Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/original-brownbear/php-transpiler
Transpiles PHP code into logically equivalent, performance optimized PHP code
https://github.com/original-brownbear/php-transpiler
Last synced: 8 days ago
JSON representation
Transpiles PHP code into logically equivalent, performance optimized PHP code
- Host: GitHub
- URL: https://github.com/original-brownbear/php-transpiler
- Owner: original-brownbear
- License: gpl-3.0
- Created: 2015-12-23T19:13:55.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2016-02-29T20:41:49.000Z (over 8 years ago)
- Last Synced: 2024-11-01T03:53:16.404Z (15 days ago)
- Language: PHP
- Homepage: http://obrown.io/php-transpiler.html
- Size: 140 KB
- Stars: 22
- Watchers: 5
- Forks: 4
- Open Issues: 6
-
Metadata Files:
- Readme: readme.md
- License: LICENSE
Awesome Lists containing this project
README
# PHP Transpiler
This tool transpiles PHP code into optimized PHP code.
Implemented features:
1. Inlines `require` and `include` statements.
2. Strips unnecessary whitespaces from the code.
3. Strips comments from code.
## Example
Run against files test.php and include.php in the same directory given as:
test.php
```php
msg();
}
}echo (new Foo)->msg();
```include.php
```php
msg();}}echo (new Foo())->msg();
```For more examples and details on this project see the project [page](http://obrown.io/php-transpiler.html).
## Usage
## Installation
To install globally via composer run
`composer global require brownbear/php-transpiler`### CLI
Either analyze a source file or directory via:
```
php-transpiler analyze /src
```or transpile a source directory into `/out` via:
```
php-transpiler transpile /src /out
```### Library
Not documented yet :/
[![Latest Stable Version](https://poser.pugx.org/brownbear/php-transpiler/v/stable)](https://packagist.org/packages/brownbear/php-transpiler)
[![Latest Unstable Version](https://poser.pugx.org/brownbear/php-transpiler/v/unstable)](//packagist.org/packages/brownbear/php-transpiler)
[![Minimum PHP Version](https://img.shields.io/badge/php-%3E%3D%205.6-8892BF.svg?style=flat-square)](https://php.net/)
[![Build Status](https://travis-ci.org/original-brownbear/php-transpiler.svg)](https://travis-ci.org/original-brownbear/php-transpiler)
[![Total Downloads](https://poser.pugx.org/brownbear/php-transpiler/downloads)](https://packagist.org/packages/brownbear/php-transpiler)
[![Code Climate](https://codeclimate.com/github/original-brownbear/php-transpiler/badges/gpa.svg)](https://codeclimate.com/github/original-brownbear/php-transpiler)
[![Test Coverage](https://codeclimate.com/github/original-brownbear/php-transpiler/badges/coverage.svg)](https://codeclimate.com/github/original-brownbear/php-transpiler/coverage)
[![Dependency Status](https://www.versioneye.com/user/projects/567fc289eb4f47003c000092/badge.svg?style=flat)](https://www.versioneye.com/user/projects/567fc289eb4f47003c000092)