Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 561715
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T12:28:43+00:00 2026-05-13T12:28:43+00:00

I use Haxe to generate PHP code. (This means you write you code in

  • 0

I use Haxe to generate PHP code. (This means you write you code in the Haxe language and get a bunch of php files after compiling.) Today a customer told me that he needs a new feature on a old project made with Haxe. He also told me that he altered some small things on the code for his own needs. Now I first have port his changes to my Haxe code and then add the new feature, because otherwise his changes will be overwritten by the next time I compile the project.

To prevent that this happens again I am looking for some kind of program that minifies / obfuscates the PHP code. The goal is to make the code unreadable / uneditable as possible.
The ideal tool would run under Linux and could process whole folders and all it containing files.

Anybody any suggestions?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T12:28:44+00:00Added an answer on May 13, 2026 at 12:28 pm

    I agree with the comment, what you are doing is very underhanded, but after 10 years in this biz I can attest to one thing: Half the code you get is so convoluted it might as well have been minified, and really function/var names are so often completely arbitrary, i’ve edited minified js and it wasn’t much more of a hassle than some unminified code.

    I couldn’t find any such script/program, most likely because this is kind of against the PHP spirit and a bit underhanded, never the less.

    First: Php isn’t white space sensitive, so step one is to remove all newlines and whitespace outside of string.

    That would make it difficult to mess with for the average tinkerer, an intermediate programmer would just find and replace all ;{} with $1\n or something to that effect.

    The next step would be to get_defined_functions and save that array (The ‘user’ key in the returned array), you’ll need to include all of the files to do this.

    If it’s oo code, you’ll need get_defined_classes as well. Save that array.

    Essentially, you need to get the variables, methods, and class instances, you’ll have to instantiate the class and get_object_vars on it, and you can poke around and see that you can get alot of other info, like Constants and class vars etc.

    Then you take those lists, loop through them, create a unique name for each thing, and then preg_replace, or str_replace that in all of the files.

    Make sure you do this on a test copy, and see what errors you get.

    Though, just to be clear, there is a special place in hell reserved for people who obfuscate for obfuscation’s sake.

    Check out: get_defined_functions get_declared_classes and just follow the links around to see what you can do.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 269k
  • Answers 269k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer If you make your view controller class the delegate for… May 13, 2026 at 1:18 pm
  • Editorial Team
    Editorial Team added an answer The names (and values) of your submit buttons should be… May 13, 2026 at 1:18 pm
  • Editorial Team
    Editorial Team added an answer Which version you are using? In Flex 4 you have… May 13, 2026 at 1:18 pm

Related Questions

Let's say I have a resource file which exports mc1 with 4 frames in
For a web project I need the possibility to generate jpg and animated gif
I have swf file with some graphics I need to use in my haxe(future
Lately I've been taking a look at Haxe , to build an application to
I wounder how to implement indentation as block delimiters in bison + flex. Just

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.