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.
- Host: GitHub
- URL: https://github.com/basemax/phpas
- Owner: BaseMax
- License: gpl-3.0
- Created: 2019-05-25T06:56:19.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2021-10-14T21:44:55.000Z (almost 4 years ago)
- Last Synced: 2025-06-06T21:46:39.987Z (4 months ago)
- Topics: beautifier, beautify, beautify-php, formatter, lexer, lexer-parser, parser, parsers, php, php-code-beautify, php-code-cleaner, php-code-formatter, scanner, scanners
- Language: PHP
- Homepage: https://www.phpclasses.org/package/11216-PHP-Beautify-PHP-source-code-fixing-its-style.html
- Size: 179 KB
- Stars: 6
- Watchers: 2
- Forks: 3
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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

### 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("