|
|
|
|
|
by mikegirouard
4915 days ago
|
|
I use PHP often for non-web things all the time… I write shell utilities all the time in PHP because it just makes sense: a simple interpreted language, with full access to my app's configuration, database access, dead simple file IO… The one-liner's are quite nice too… Just today at work I needed to come up with a base64 encoded json string from a data set in an ini file to pass into my Java app via stdin. It was something like: php -r 'echo base64_encode(json_encode(parse_ini_file("app.ini")));' | java -classpath Foo.jar com.example.foo.App
So… yeah. I don't think it's fair to say that "PHP is terrible at being a general purpose language". You just haven't done enough of it yet to appreciate it. |
|