The simplest PHP-to-EXE conversion ever
We all know PHP, and we all love standalone EXE tools for simple, repetitive tasks.
There is a tool called phc-win
that can compile a PHP program for you and
create an EXE of it; but now it's a lot more straightforward. All you need to do
phpflexer compile myprogram.php
...and you have your EXE file in a split second. It only knows the basics
so it's not for heavyweight rounds but for simple tools it's more than
enough. I've made a LESS compiler, a file change watcher, a backup tool
and a lot of other stuff with it so for me it has proven to be really
useful; I decided to publish it. Even if it's basically the same as phc-win
without the graphical interface, it's very different when it comes to
To make testing & understanding easier, there are sample PHP scripts included.
First of all there's a Hello World, it's the absolute minimum since Kernighan
and Ritchie. Then there's one called findwords
that can parse files
looking for a combination of words,
like "give me all lines where all these words occur",
which is quite a common need and there is no obvious way to do it (usually
even IDEs and editors only have an option to use regex and they think they're
done; now look for 4 words in any order using regex - whatever, #sigh).
And the 3rd example is a directory stats tool, showing you the subdirectories
of a certain starting point and all their sizes. Again, something that you
can write with just a few lines of coding but hard to implement as a handy
little exe. Not anymore.