Giter VIP home page Giter VIP logo

tinyphp's Introduction

Tiny PHP is a little tool I put together that performs some “minification” on PHP code. Is it a trivial and completely academic exercise because PHP doesn’t benefit from being smaller like CSS or Javascript? Yes. But it’s still kind of cool.

What it does

In short, the goal is to take a snippet, function, or page of PHP and condense it. It will replace variables, remove comments, and/or remove whitespace. To call this tool an obfuscator is not really right, but it does make code harder to read. It also has some fancy options that allow you to exclude certain variables from being replaced so your classe’s calls don’t get mushed up.

What it doesn’t do

The Tiny PHP tool does not attempt to minify function names, class names, or any references related to those objects. Were not trying to take your entire app and make it stupidly hard to maintain, there are lots of other programs out there to do that.

How I use it

There is really no reason to use this type of tool in production code. If you are just messing around though, it is sometimes nice to take a set of methods or functions, and condense them into four or five lines, if their only purpose is to simply exist and never be edited. Also, if an application has spiraled into a mess of variables that have absolutely no meaning, there becomes no difference between them being long and annoying, or short and sweet.

tinyphp's People

Contributors

mattgaidica avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

tinyphp's Issues

"make it stupidly hard to maintain"

I found a stupidity issue about the next text:


What it doesn’t do

The Tiny PHP tool does not attempt to minify function names, class names, or any references related to those objects. Were not trying to take your entire app and make it stupidly hard to maintain, there are lots of other programs out there to do that.


Exactily in the point "and make it stupidly hard to maintain".

You could have said some things like " The cost of ensure properly the minify of the funstions names in PHP is so high. For example we can create a function called 'execute' and other called 'query'. Then later those function also can appears as names of a PDO implementation, then if we replace all occurrences for execute and query, we break the imaginary possible PDO implementation. That obly us to fetch the name functions in a expensive way.... etc etc..."

But what is stupid and idiot is to say we go to minify the code but we go to make it easy to read because we don't minifier the functions names.

So that issue is only about the malarkey you can read here, This seems like lamerland

Sorry my very bad english, I rely that is readable

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.