News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

PHP as a scripting language

Started by pikaugrils4, September 03, 2020, 10:39:24 AM

Previous topic - Next topic

pikaugrils4

I've been using PHP for years for web development but I've never really considered using it for local scripting.

Are there any reasons anyone can think that would make it not viable? I'm talking specifically about using it on Debian to automate certain things. I know usually people would use perl/Python for this sort of thing but I dislike both.

The only thing I'm thinking that would be a hindrance (a potentially big one) would be the "max execution time" setting in the ini. Obviously that make sense for a web server, but can you turn it off for local scripting? Or set it to unlimited?

Arantor

Max execution time is not relevant when running from the command line, it's unlimited by default.

It is in fact perfectly viable to do, Symfiny even has a component to make this easy (symfony/console). It's just not considered trendy but if you already have it installed, go nuts. I know I have in the past.
Holder of controversial views, all of which my own.


Tyrsson

Quote from: Arantor on September 03, 2020, 11:18:08 AMMax execution time is not relevant when running from the command line, it's unlimited by default.

It is in fact perfectly viable to do, Symfiny even has a component to make this easy (symfony/console). It's just not considered trendy but if you already have it installed, go nuts. I know I have in the past.
They got a composer package for it :)
PM at your own risk, some I answer, if they are interesting, some I ignore.

Advertisement: