An open API service indexing awesome lists of open source software.

https://github.com/basemax/phpas

PHP Auto Style: A tool for format and beautify the style of PHP code with my style.
https://github.com/basemax/phpas

beautifier beautify beautify-php formatter lexer lexer-parser parser parsers php php-code-beautify php-code-cleaner php-code-formatter scanner scanners

Last synced: 4 months ago
JSON representation

PHP Auto Style: A tool for format and beautify the style of PHP code with my style.

Awesome Lists containing this project

README

          

# PHP AS(Auto Style), PHP Beautifier

A tool for format and beautify the style of PHP code with my style.

## Purpose

We waste our time to format the code.
So it will be a fantastic tool.

Anyway, I hope this tool can help you for format a PHP code easily and fast.

## Story

I developed this tool for myself, not for money, not for a special company.

Although it used in some software of a company in India.

Also it used as PHP snippet formate on [PHPize.online](https://phpize.online)

## Main purpose

- Remove extra space after "for", "while", "if" words...
- Ident cleaning and auto tab for {} and statements...
- Make clean the comment text
- ...

### Demo

Left: Output, Right: Input

![ScreenShot](https://raw.githubusercontent.com/BaseMax/PHPAS/master/screenshot.png)

### Usage

```php
' ' // 4 spaces (default Tab)
];

$autoStyle = new AutoStyle($options);

/* Format code from file */
print $AS->loadFile("test.php") ."\n";

/* Format code from string */
print $AS->loadString("