PHP Classes

PHP source code protection: I need a class to make the PHP production code harder readable

Recommend this page to a friend!
  All requests RSS feed  >  PHP source code protection  >  Request new recommendation  >  A request is featured when there is no good recommended package on the site when it is posted. Featured requests  >  No recommendations No recommendations  

PHP source code protection

Edit

Picture of Vallo Reima by Vallo Reima - 9 years ago (2015-08-04)

I need a class to make the PHP production code harder readable

This request is clear and relevant.
This request is not clear or is not relevant.

+7

The class should process the PHP 5.4+ source:

  1. remove whitespaces and comments
  2. scramble (not encode)
  3. handle both pure PHP (incl. nowdoc) and phtml (PHP tags inside HTML) files
  • 2 Clarification requests
  • 6. Picture of Till Wehowski by Till Wehowski - 9 years ago (2015-08-27) Reply

    remove whitespaces and comments - OK scramble (not encode) - Useless and bad practise

    compress. minify, obfuscate are three diffrent tasks and should be handled apart of each other. E.g. you minify the code and compress the file.

    Obfuscate, mh, just wasted time in any case, imho, you should consider to choose a real encryption method instead or just keep the code open.

    • 1. Picture of Manuel Lemos by Manuel Lemos - 9 years ago (2015-08-04) Reply

      What do you mean by scramble (not encode)? Do you mean obfuscate variable names and not use encodings like base64 to make code unreadable?

      • 2. Picture of Vallo Reima by Vallo Reima - 9 years ago (2015-08-05) in reply to comment 1 by Manuel Lemos Comment

        I meant obfuscation mainly, i.e. NOT the encoding requiring any loader (PHP extension) installation.

      • 3. Picture of Manuel Lemos by Manuel Lemos - 9 years ago (2015-08-05) in reply to comment 2 by Vallo Reima Comment

        There are several classes that obfuscate the code including removing comments, white space and changing variable names.

        Did you find any limitation in those that exist or you are just not sure which one would be best for your requirements?

      • 4. Picture of Vallo Reima by Vallo Reima - 9 years ago (2015-08-06) in reply to comment 3 by Manuel Lemos Comment

        I found several classes needing adaptation. For example 1) that would satisfy initially: http://www.phpclasses.org/package/7156-PHP-Reduce-the-size-of-PHP-source-files.html Unfortunately, the downloaded version didn't work. I posted the question to the forum but no answer yet. 2) that seems interesting (though in php 4): http://www.phpclasses.org/package/3241-PHP-Obfuscate-PHP-code-using-filters-and-compression.html I'll learn more. Thanks for reply.

      • 5. Picture of Manuel Lemos by Manuel Lemos - 9 years ago (2015-08-08) in reply to comment 4 by Vallo Reima Comment

        Would you like a solution that also renames variables? Because there are a few may work that way and also remove white space and comments.

      • 7. Picture of shivam kumar by shivam kumar - 8 years ago (2016-06-30) in reply to comment 2 by Vallo Reima Comment

        please tell me how to attach file in php?

    Ask clarification

    2 Recommendations

    PHP Application Packer: Create packages of project files for distribution

    This recommendation solves the problem.
    This recommendation does not solve the problem.

    +2

    Picture of Vallo Reima by Vallo Reima package author package author Reputation 90 - 8 years ago (2016-01-21) Comment

    This package minifies the PHP source files on the project level. It can also minify the JavaScript, HTML, CSS, JSON and XML sources. The PackApp extended version is available to obfuscate the PHP source code.

    • 1 Comment
    • 4. Picture of shivam kumar by shivam kumar - 8 years ago (2016-06-30) in reply to comment 3 by Vallo Reima Reply

      good


    nabiBust: Obfuscate PHP code scripts

    This recommendation solves the problem.
    This recommendation does not solve the problem.

    +2

    Picture of Manuel Lemos by Manuel Lemos Reputation 23995 - 9 years ago (2015-08-15) Comment

    This class may be suitable for your purposes. It can remove white spaces and comments and rename variables so they do not become recognizable.

    • 2 Comments
    • 1. Picture of Vallo Reima by Vallo Reima - 9 years ago (2015-08-19) Reply

      Thanks for recommendation. I'll try it.

    • 2. Picture of Vallo Reima by Vallo Reima - 9 years ago (2015-08-26) Reply

      My choice is so far: Best PHP Obfuscator from Pipsomania Co.

      The only issue encountered: anonymous functions are not obfuscated correctly. Unfortunately, can't contact the authors.


    Recommend package
    : 
    :