4 ms·
It is interesting that PHP is ruled out as insecure. I am not sure that for system administration tasks modern PHP is particularly worse than Perl and these day
by fpoling 6y ago
It is interesting that PHP is ruled out as insecure. I am not sure that for system administration tasks modern PHP is particularly worse than Perl and these days more people know PHP than Perl.
- captn3m0 6y agoYeah, for scripting, PHP can easily be more readable, especially because of its amazing (sometimes confusing) Standard library. It lets you parse INI files in a single call for eg.
- tankenmate 6y agoAs does Perl if you use Config::Inifiles or Config::INI::Reader (depending on whether you want a full blown solution or just a quick INI file => hash solution).
- dtech 6y agoYeah, quite weird. PHP as a webserver has a large amount of known language design things which decreased security (most have been removed over the years afaik), but for scripting? I can't think why it's particularly insecure compared to Python or Perl.
- acomjean 6y agoperhaps its built in web server? python has that too though.
- aganame 6y agoNo, it's not interesting at all. PHP is fairly good at web things, but that's it.
- acomjean 6y agoI use php for small scripts that need to read csv and database lookup from the command line. It has built ins for these that work without any environment setup which is great sometimes. Perl has some easy oneliners too. Depending on where I'm working sometimes I don't want to set up an environment.
- mtnGoat 6y agoi dunno, i wrote PHP scripts for the CLI that run a $100m+ business and execute many millions of times per day. PHP is great for things not web-related, i think many just didnt take the time to learn.
- aganame 6y agoWhat specifically do you think makes PHP especially great for that?
- nineteen999 6y agoDoes PHP have anything approaching CPAN? That is one of the key reasons I still dust off Perl for quick and dirty things from time to time, as well as the compact and accessible regex syntax.
- smacktoward 6y agoYes: https://packagist.org/ https://packagist.org/
- fomine3 6y agophp.ini global configuration file is a pain that other script languages don't have.