Re: Command line PHP
| From: | Ashley Sheridan | Date: | Fri, 07 Jan 2011 18:53:21 +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-310560@lists.php.net to get a copy of this message | ||
On Fri, 2011-01-07 at 13:31 -0500, Joshua Kehn 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.
>
> 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.
>
> Regards,
>
> -Josh
> ____________________________________
> Joshua Kehn | Josh.Kehn@gmail.com
> http://joshuakehn.com
>
There's no real reason why you shouldn't use PHP for cli apps, it has a
lot of features specifically intended for it even. I've found it to be
fast enough for my needs, it's familiar, and I don't need to compile an
app every time I make a small code change.
Yes PHP is primarily a web-based language, but there's no reason it
can't be used other places too. In fact, I've even got PHP installed on
my Android phone, although I've yet to find a practical use for that!
Thanks,
Ash
http://www.ashleysheridan.co.uk