WEB PHP reformat/indent/unobfuscate from shell

Discussion in 'OT Technology' started by Supergeek, Nov 25, 2009.

  1. Supergeek

    Supergeek New Member

    Joined:
    Jan 23, 2007
    Messages:
    1,855
    Likes Received:
    0
    Location:
    Colorado
    I've been Googling for an hour or so now, and every PHP "pretty printer" slash reformatter slash indenter is either junk or GUI-based.

    I need something that actually works from the shell. If you have actual experience with such a beast, pleast post. I need to unravel some obfuscated PHP, and there's like 20 files.
     
  2. brds

    brds OT Supporter

    Joined:
    Jun 26, 2006
    Messages:
    17,646
    Likes Received:
    15
    Location:
    Atlanta
    I have no idea what you're trying to do... thus no way to try to help
     
  3. Supergeek

    Supergeek New Member

    Joined:
    Jan 23, 2007
    Messages:
    1,855
    Likes Received:
    0
    Location:
    Colorado
    I need a way to turn

    Code:
    line; line; for (loop) { command; command; } line;
    into
    Code:
    line;
    line;
    for (loop) {
        command;
        command;
    }
    line;
    
    I have some obfuscated code that I need unobfuscated.
     
  4. Supergeek

    Supergeek New Member

    Joined:
    Jan 23, 2007
    Messages:
    1,855
    Likes Received:
    0
    Location:
    Colorado
    It's actually obfuscated with meaningless variable names and the whole shebang, but I'd like a PHP formatter for general use as well.

    I know there are online formatters, but I'm looking for something I can do bulk operations with instead of one-off page loads where my code could potentially be saved on someone else's server.
     
  5. Half-Time

    Half-Time OT Supporter

    Joined:
    Mar 21, 2007
    Messages:
    6,460
    Likes Received:
    0
    Location:
    Houston

Share This Page