Re: Command line PHP
| From: | Nathan Nobbe | Date: | Fri, 07 Jan 2011 18:48:23 +0000 |
| Subject: | Re: Command line PHP | ||
| References: | 1 2 3 4 5 6 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-310559@lists.php.net to get a copy of this message | ||
On Fri, Jan 7, 2011 at 11:31 AM, Joshua Kehn <josh.kehn@gmail.com> wrote:
> On Jan 7, 2011, at 12:34 PM, Daniel Brown wrote:
>
> > On Fri, Jan 7, 2011 at 12:18, Joshua Kehn <josh.kehn@gmail.com> wrote:
> >>
> >> Using another language more suited towards CLI / standalone (non-web)
> development would be easier. PHP at it's core is a templating language. I
> don't think it is as suited as say Python for developing standalone
> applications.
> >
> > One might argue that it depends on your mastery of and comfort
> > with the language. That in mind, the same is true of nearly any
> > programming language.
> >
> > And thanks for reminding me of what PHP is at its core. ;-P
> >
> > --
> > </Daniel P. Brown>
> > Network Infrastructure Manager
> > Documentation, Webmaster Teams
> > http://www.php.net/
>
> My apologies. I just view PHP as a perfected web language, due to it's
> templating nature, while using it for other things (scripts, utilities,
> cron) is a misuse in my opinion.
>
shrug, you must not be too familiar with php then. 9 times out of 10 it's
the natural, perfect choice for a cli program. there are situations where
you get past what php is ideal for on the cli, typically when you get into
heavy forking or require threading.
> It does completely depend on your mastery of the language. If you're very
> good with PHP and you don't often do non-web things it might not make sense
> to learn another language as well.
why bother learning 2 languages when 1 will suit most needs perfectly? for
most folks who work with the web and a typical deployment environment like a
linux server, the second language of choice most likely would be a client
side one like javascript.
-nathan