Jump to content

Looking for a PHP beautifier like Tidy for AU3


Exit
 Share

Recommended Posts

I make plugins for WordPress and am dissatisfied with the built-in editor.
I'm now looking for a way to format the PHP code like TIDY does in AU3-Editor.
I've already tried some online tools but they are buggy or have too few formatting options.

Buggy: http://www.phpformatter.com/
Missing options: https://homepage-kosten.de/php_beautifier.php

Here is the code to check if the beautifier is buggy:

<?php
/*
Version: 2021.08.08#1
*/
exit ( ' Version is: ' . chop ( substr ( file ( __FILE__ ) [ 2 ] , 9 , 13 ) ) ) ;
/*
Output from PHP Formatter:
Format Error on line 5: parse error, unexpected '['([), expecting ')'!

Output in Browser:
Version is: 2021.08.08#1
*/
?>

It would be great if you showed me a link to another beautifier that is not buggy and has options for compression.  
e.g. do not put comments in a new line. 
Or even better, a hint as to which PHP editor in WordPress meets these requirements.

TIA Exit

App: Au3toCmd              UDF: _SingleScript()                             

Link to comment
Share on other sites

  • 1 year later...

Hi @Exit, hi @Skysnake,

I am not sure if it's still worthy to answer here, but maybe someone is interested or maybe this is helpful for someone.
You should have a closer look at this beautifier or even better (IMO) a VSCode extension like phpfmt - PHP formatter which provides several settings.

Best regards
Sven

________________
Stay innovative!

Stay innovative!

Spoiler

🌍 Au3Forums

🎲 AutoIt (en) Cheat Sheet

📊 AutoIt limits/defaults

💎 Code Katas: [...] (comming soon)

🎭 Collection of GitHub users with AutoIt projects

🐞 False-Positives

🔮 Me on GitHub

💬 Opinion about new forum sub category

📑 UDF wiki list

✂ VSCode-AutoItSnippets

📑 WebDriver FAQs

👨‍🏫 WebDriver Tutorial (coming soon)

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...