FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » What *tasks* are hard for PHP?
Show: Today's Messages :: Polls :: Message Navigator
Switch to threaded view of this topic Create a new topic Submit Reply
What *tasks* are hard for PHP? [message #171956] Mon, 24 January 2011 02:03 Go to next message
Bruce M. Axtens is currently offline  Bruce M. Axtens
Messages: 7
Registered: October 2010
Karma: 0
Junior Member
I've asked this question on my blog. See <http://
codeaholic.blogspot.com/2011/01/php-what-cant-or-wouldnt-you-do-in-
php.html>. No flames required. No discussion about language semantics
or implementation either (if at all possible). I just want to get an
idea of what can and can't be done with PHP at the task level.

Bruce.
Re: What *tasks* are hard for PHP? [message #171960 is a reply to message #171956] Mon, 24 January 2011 09:51 Go to previous messageGo to next message
The Natural Philosoph is currently offline  The Natural Philosoph
Messages: 993
Registered: September 2010
Karma: 0
Senior Member
axtens wrote:
> I've asked this question on my blog. See <http://
> codeaholic.blogspot.com/2011/01/php-what-cant-or-wouldnt-you-do-in-
> php.html>. No flames required. No discussion about language semantics
> or implementation either (if at all possible). I just want to get an
> idea of what can and can't be done with PHP at the task level.
>
> Bruce.
I hav found it crap at taking the dogs for a walk.
Re: What *tasks* are hard for PHP? [message #171961 is a reply to message #171960] Mon, 24 January 2011 10:05 Go to previous messageGo to next message
Erwin Moller is currently offline  Erwin Moller
Messages: 228
Registered: September 2010
Karma: 0
Senior Member
On 1/24/2011 10:51 AM, The Natural Philosopher wrote:
> axtens wrote:
>> I've asked this question on my blog. See <snip>.
No flames required. No discussion about language semantics
>> or implementation either (if at all possible). I just want to get an
>> idea of what can and can't be done with PHP at the task level.
>>
>> Bruce.
> I hav found it crap at taking the dogs for a walk.

Same here, TNP.
PHP completely fails at that task!
(I couldn't reach Zend, nor Lerdorf or Gutmans for comment!)

Appart from that, PHP does pretty much anything I expect from a
serverside language.
But Axtens is only spamming his/her blog, right?

Regards,
Erwin Moller

--
"That which can be asserted without evidence, can be dismissed without
evidence."
-- Christopher Hitchens
Re: What *tasks* are hard for PHP? [message #171962 is a reply to message #171960] Mon, 24 January 2011 10:08 Go to previous messageGo to next message
alvaro.NOSPAMTHANX is currently offline  alvaro.NOSPAMTHANX
Messages: 277
Registered: September 2010
Karma: 0
Senior Member
El 24/01/2011 10:51, The Natural Philosopher escribió/wrote:
> axtens wrote:
>> I've asked this question on my blog. See <http://
>> codeaholic.blogspot.com/2011/01/php-what-cant-or-wouldnt-you-do-in-
>> php.html>. No flames required. No discussion about language semantics
>> or implementation either (if at all possible). I just want to get an
>> idea of what can and can't be done with PHP at the task level.
>>
>> Bruce.
> I hav found it crap at taking the dogs for a walk.

May I suggest you upgrade to cats?


--
-- http://alvaro.es - Álvaro G. Vicario - Burgos, Spain
-- Mi sitio sobre programación web: http://borrame.com
-- Mi web de humor satinado: http://www.demogracia.com
--
Re: What *tasks* are hard for PHP? [message #171963 is a reply to message #171962] Mon, 24 January 2011 10:36 Go to previous messageGo to next message
The Natural Philosoph is currently offline  The Natural Philosoph
Messages: 993
Registered: September 2010
Karma: 0
Senior Member
Álvaro G. Vicario wrote:
> El 24/01/2011 10:51, The Natural Philosopher escribió/wrote:
>> axtens wrote:
>>> I've asked this question on my blog. See <http://
>>> codeaholic.blogspot.com/2011/01/php-what-cant-or-wouldnt-you-do-in-
>>> php.html>. No flames required. No discussion about language semantics
>>> or implementation either (if at all possible). I just want to get an
>>> idea of what can and can't be done with PHP at the task level.
>>>
>>> Bruce.
>> I hav found it crap at taking the dogs for a walk.
>
> May I suggest you upgrade to cats?
>
>

Have those as well. Bloody socialists. Expect you to provide em with a
home, free food and medical treatment, and even then, when they don't
get it, they crap in the bath.
Re: What *tasks* are hard for PHP? [message #171964 is a reply to message #171963] Mon, 24 January 2011 10:42 Go to previous messageGo to next message
Bruce M. Axtens is currently offline  Bruce M. Axtens
Messages: 7
Registered: October 2010
Karma: 0
Junior Member
On Jan 24, 6:36 pm, The Natural Philosopher <t...@invalid.invalid>
wrote:
> Álvaro G. Vicario wrote:
>> El 24/01/2011 10:51, The Natural Philosopher escribió/wrote:
>>> axtens wrote:
>>>> I've asked this question on my blog. See <http://
>>>> codeaholic.blogspot.com/2011/01/php-what-cant-or-wouldnt-you-do-in-
>>>> php.html>. No flames required. No discussion about language semantics
>>>> or implementation either (if at all possible). I just want to get an
>>>> idea of what can and can't be done with PHP at the task level.
>
>>>> Bruce.
>>> I hav found it crap at taking the dogs for a walk.
>
>> May I suggest you upgrade to cats?
>
> Have those as well. Bloody socialists. Expect you to provide em with a
> home, free food and medical treatment, and even then, when they don't
> get it, they crap in the bath.

There's got to be a way of asking this question, without getting such
high quality responses.

Bruce.
Re: What *tasks* are hard for PHP? [message #171965 is a reply to message #171964] Mon, 24 January 2011 10:51 Go to previous messageGo to next message
alvaro.NOSPAMTHANX is currently offline  alvaro.NOSPAMTHANX
Messages: 277
Registered: September 2010
Karma: 0
Senior Member
El 24/01/2011 11:42, axtens escribió/wrote:
> On Jan 24, 6:36 pm, The Natural Philosopher<t...@invalid.invalid>
> wrote:
>> Álvaro G. Vicario wrote:
>>> El 24/01/2011 10:51, The Natural Philosopher escribió/wrote:
>>>> axtens wrote:
>>>> > I've asked this question on my blog. See<http://
>>>> > codeaholic.blogspot.com/2011/01/php-what-cant-or-wouldnt-you-do-in-
>>>> > php.html>. No flames required. No discussion about language semantics
>>>> > or implementation either (if at all possible). I just want to get an
>>>> > idea of what can and can't be done with PHP at the task level.
>>
>>>> > Bruce.
>>>> I hav found it crap at taking the dogs for a walk.
>>
>>> May I suggest you upgrade to cats?
>>
>> Have those as well. Bloody socialists. Expect you to provide em with a
>> home, free food and medical treatment, and even then, when they don't
>> get it, they crap in the bath.
>
> There's got to be a way of asking this question, without getting such
> high quality responses.

It normally helps if you compose the question text in a such a way that
it doesn't look like an advert for your site. Whatever, you have to
assume this is Usenet and you'll get "RTM" and "Try Google" no matter
what you ask.


--
-- http://alvaro.es - Álvaro G. Vicario - Burgos, Spain
-- Mi sitio sobre programación web: http://borrame.com
-- Mi web de humor satinado: http://www.demogracia.com
--
Re: What *tasks* are hard for PHP? [message #171966 is a reply to message #171964] Mon, 24 January 2011 11:17 Go to previous messageGo to next message
The Natural Philosoph is currently offline  The Natural Philosoph
Messages: 993
Registered: September 2010
Karma: 0
Senior Member
axtens wrote:
> On Jan 24, 6:36 pm, The Natural Philosopher <t...@invalid.invalid>
> wrote:
>> Álvaro G. Vicario wrote:
>>> El 24/01/2011 10:51, The Natural Philosopher escribió/wrote:
>>>> axtens wrote:
>>>> > I've asked this question on my blog. See <http://
>>>> > codeaholic.blogspot.com/2011/01/php-what-cant-or-wouldnt-you-do-in-
>>>> > php.html>. No flames required. No discussion about language semantics
>>>> > or implementation either (if at all possible). I just want to get an
>>>> > idea of what can and can't be done with PHP at the task level.
>>>> > Bruce.
>>>> I hav found it crap at taking the dogs for a walk.
>>> May I suggest you upgrade to cats?
>> Have those as well. Bloody socialists. Expect you to provide em with a
>> home, free food and medical treatment, and even then, when they don't
>> get it, they crap in the bath.
>
> There's got to be a way of asking this question, without getting such
> high quality responses.
>
Try using plain English instead of techno-babble.

'At the task level', indeed!


Look up what 'task' means.

> Bruce.
Re: What *tasks* are hard for PHP? [message #171967 is a reply to message #171965] Mon, 24 January 2011 13:49 Go to previous messageGo to next message
Bruce M. Axtens is currently offline  Bruce M. Axtens
Messages: 7
Registered: October 2010
Karma: 0
Junior Member
On Jan 24, 6:51 pm, "Álvaro G. Vicario"
<alvaro.NOSPAMTH...@demogracia.com.invalid> wrote:
> El 24/01/2011 11:42, axtens escribió/wrote:
>
>
>
>> On Jan 24, 6:36 pm, The Natural Philosopher<t...@invalid.invalid>
>> wrote:
>>> Álvaro G. Vicario wrote:
>>>> El 24/01/2011 10:51, The Natural Philosopher escribió/wrote:
>>>> > axtens wrote:
>>>> >> I've asked this question on my blog. See<http://
>>>> >> codeaholic.blogspot.com/2011/01/php-what-cant-or-wouldnt-you-do-in-
>>>> >> php.html>. No flames required. No discussion about language semantics
>>>> >> or implementation either (if at all possible). I just want to get an
>>>> >> idea of what can and can't be done with PHP at the task level.
>
>>>> >> Bruce.
>>>> > I hav found it crap at taking the dogs for a walk.
>
>>>> May I suggest you upgrade to cats?
>
>>> Have those as well. Bloody socialists. Expect you to provide em with a
>>> home, free food and medical treatment, and even then, when they don't
>>> get it, they crap in the bath.
>
>> There's got to be a way of asking this question, without getting such
>> high quality responses.
>
> It normally helps if you compose the question text in a such a way that
> it doesn't look like an advert for your site.

Fair point.

> Whatever, you have to
> assume this is Usenet and you'll get "RTM" and "Try Google" no matter
> what you ask.

<sigh> It's just that I've tried Google, have read all sorts of
interesting things in online manuals. I just haven't had any success
in formulating the kind of question that gets the information I'm
after.

However, thank you. Thank you for responding thoughtfully. Much
appreciated.

Bruce.
Re: What *tasks* are hard for PHP? [message #171968 is a reply to message #171966] Mon, 24 January 2011 13:54 Go to previous messageGo to next message
Bruce M. Axtens is currently offline  Bruce M. Axtens
Messages: 7
Registered: October 2010
Karma: 0
Junior Member
On Jan 24, 7:17 pm, The Natural Philosopher <t...@invalid.invalid>
wrote:
> axtens wrote:
>> On Jan 24, 6:36 pm, The Natural Philosopher <t...@invalid.invalid>
>> wrote:
>>> Álvaro G. Vicario wrote:
>>>> El 24/01/2011 10:51, The Natural Philosopher escribió/wrote:
>>>> > axtens wrote:
>>>> >> I've asked this question on my blog. See <http://
>>>> >> codeaholic.blogspot.com/2011/01/php-what-cant-or-wouldnt-you-do-in-
>>>> >> php.html>. No flames required. No discussion about language semantics
>>>> >> or implementation either (if at all possible). I just want to get an
>>>> >> idea of what can and can't be done with PHP at the task level.
>>>> >> Bruce.
>>>> > I hav found it crap at taking the dogs for a walk.
>>>> May I suggest you upgrade to cats?
>>> Have those as well. Bloody socialists. Expect you to provide em with a
>>> home, free food and medical treatment, and even then, when they don't
>>> get it, they crap in the bath.
>
>> There's got to be a way of asking this question, without getting such
>> high quality responses.
>
> Try using plain English instead of techno-babble.
>
> 'At the task level', indeed!
>
> Look up what 'task' means.
>
>> Bruce.
>
>

Okay, so would *you* phrase it, seeing as I'm so dumb? I want a list
of things that are hard to do in PHP. Can PHP do decision tables? Or
change from outputting HTML to outputting RTF by just changing one
instruction (okay, it's not fair to pit PHP against Protium but do you
get what I mean here?) Okay, one thing I know already: PHP sucks when
it comes to Unicode. Anything else?

Bruce.
What can't (or wouldn't) you do in PHP? [was What *tasks* are hard for PHP?] [message #171969 is a reply to message #171956] Mon, 24 January 2011 14:06 Go to previous messageGo to next message
Luuk is currently offline  Luuk
Messages: 329
Registered: September 2010
Karma: 0
Senior Member
On 24-01-11 03:03, axtens wrote:
> I've asked this question on my blog. See <http://
> codeaholic.blogspot.com/2011/01/php-what-cant-or-wouldnt-you-do-in-
> php.html>. No flames required. No discussion about language semantics
> or implementation either (if at all possible). I just want to get an
> idea of what can and can't be done with PHP at the task level.
>
> Bruce.



You could also reverse the approach, and start with the question what to
expect from PHP.
This way you might find out what you can expect from PHP, and this might
give a clue about what not to expect.

Als you might define 'task'..
Because wikipedia also does not know what it is, and gives a list of 6
possible meanings (http://en.wikipedia.org/wiki/Task)



--
Luuk
Re: What *tasks* are hard for PHP? [message #171970 is a reply to message #171968] Mon, 24 January 2011 14:09 Go to previous messageGo to next message
Thomas 'PointedEars'  is currently offline  Thomas 'PointedEars'
Messages: 701
Registered: October 2010
Karma: 0
Senior Member
axtens wrote:

> Okay, so would *you* phrase it, seeing as I'm so dumb? I want a list
> of things that are hard to do in PHP. Can PHP do decision tables? Or
> change from outputting HTML to outputting RTF by just changing one
> instruction (okay, it's not fair to pit PHP against Protium but do you
> get what I mean here?) Okay, one thing I know already: PHP sucks when
> it comes to Unicode. Anything else?

Nothing you could not bring down to your oversimplifying ("task") level of
discussion.

BTW, nobody cares about your blog. This is Usenet; post *here*, discuss
*here*.


PointedEars
--
realism: HTML 4.01 Strict
evangelism: XHTML 1.0 Strict
madness: XHTML 1.1 as application/xhtml+xml
-- Bjoern Hoehrmann
Re: What *tasks* are hard for PHP? [message #171971 is a reply to message #171968] Mon, 24 January 2011 14:11 Go to previous messageGo to next message
Captain Paralytic is currently offline  Captain Paralytic
Messages: 204
Registered: September 2010
Karma: 0
Senior Member
On Jan 24, 1:54 pm, axtens <bruce.axt...@gmail.com> wrote:
> Okay, so would *you* phrase it, seeing as I'm so dumb? I want a list
> of things that are hard to do in PHP. Can PHP do decision tables? Or
> change from outputting HTML to outputting RTF by just changing one
> instruction (okay, it's not fair to pit PHP against Protium but do you
> get what I mean here?) Okay, one thing I know already: PHP sucks when
> it comes to Unicode. Anything else?
>
> Bruce.

This is not a sensible question. As pointed out, there are an infinite
number of things that are hard to do in php, just as there are an
infinite number of things that are hard to do in COBOL. Having said
that, these things that are hard to do tend to be a lot easier to do
when one knows how to do them.

For instance, I had no idea that it was hard to do Unicode in php. I
wish you had told me that before I found it so easy to do Unicode in
php, because I'd have found something even easier!

If you ask Richard or jRough, they will tell you that it is hard to do
anything in php or indeed in any other language. It tends to depend on
your point of view.
Re: What *tasks* are hard for PHP? [message #171972 is a reply to message #171964] Mon, 24 January 2011 14:30 Go to previous messageGo to next message
Thomas 'PointedEars'  is currently offline  Thomas 'PointedEars'
Messages: 701
Registered: October 2010
Karma: 0
Senior Member
axtens wrote:

> The Natural Philosopher wrote:
>> Álvaro G. Vicario wrote:
>>> El 24/01/2011 10:51, The Natural Philosopher escribió/wrote:
>>>> […]
>
> There's got to be a way of asking this question, without getting such
> high quality responses.

There is: <http://www.catb.org/~esr/faqs/smart-questions.html>


HTH

PointedEars
--
Prototype.js was written by people who don't know javascript for people
who don't know javascript. People who don't know javascript are not
the best source of advice on designing systems that use javascript.
-- Richard Cornford, cljs, <f806at$ail$1$8300dec7(at)news(dot)demon(dot)co(dot)uk>
Re: What *tasks* are hard for PHP? [message #171973 is a reply to message #171968] Mon, 24 January 2011 14:48 Go to previous messageGo to next message
Erwin Moller is currently offline  Erwin Moller
Messages: 228
Registered: September 2010
Karma: 0
Senior Member
On 1/24/2011 2:54 PM, axtens wrote:
> On Jan 24, 7:17 pm, The Natural Philosopher<t...@invalid.invalid>
> wrote:
>> axtens wrote:
>>> On Jan 24, 6:36 pm, The Natural Philosopher<t...@invalid.invalid>
>>> wrote:
>>>> Álvaro G. Vicario wrote:
>>>> > El 24/01/2011 10:51, The Natural Philosopher escribió/wrote:
>>>> >> axtens wrote:
>>>> >>> I've asked this question on my blog. See<http://
>>>> >>> codeaholic.blogspot.com/2011/01/php-what-cant-or-wouldnt-you-do-in-
>>>> >>> php.html>. No flames required. No discussion about language semantics
>>>> >>> or implementation either (if at all possible). I just want to get an
>>>> >>> idea of what can and can't be done with PHP at the task level.
>>>> >>> Bruce.
>>>> >> I hav found it crap at taking the dogs for a walk.
>>>> > May I suggest you upgrade to cats?
>>>> Have those as well. Bloody socialists. Expect you to provide em with a
>>>> home, free food and medical treatment, and even then, when they don't
>>>> get it, they crap in the bath.
>>
>>> There's got to be a way of asking this question, without getting such
>>> high quality responses.
>>
>> Try using plain English instead of techno-babble.
>>
>> 'At the task level', indeed!
>>
>> Look up what 'task' means.
>>
>>> Bruce.
>>
>>
>
> Okay, so would *you* phrase it, seeing as I'm so dumb? I want a list
> of things that are hard to do in PHP. Can PHP do decision tables? Or
> change from outputting HTML to outputting RTF by just changing one
> instruction (okay, it's not fair to pit PHP against Protium but do you
> get what I mean here?) Okay, one thing I know already: PHP sucks when
> it comes to Unicode. Anything else?
>
> Bruce.

Hi Bruce,

A decision table can be build in any language, even VBscript.
PHP is very strong when it comes to array manipulation, so I'd say it is
even easier to implement decision tables in PHP than in many other
languages.

HTML --> RTF ?
I wouldn't know.
I also wonder how such a RTF would look like for complex pages with lots
of positioned elements.
But if you want a simple html-->rtf, google around a sec to see what
others have come up with so far.
First google hit:
http://www.phpclasses.org/package/1805-PHP-Create-RTF-documents-from-HTML.h tml

But be prepared to find a lot of bad scripts on the net.
So it is better to master PHP yourself. (After that you won't ask
anymore "if it is possible to convert html to rtf by changing one
instruction", because you will understand better what is involved, and
that the question is a bit silly.)

I view PHP as a versatile general purpose programming language.
Of course it is centered around http, but it isn't limited to that.
I have used PHP for batched wav-file cut/pasting based on cuepoints,
batched image manipulation, artificial intelligence, etc.

If there is one thing missing in PHP, I'd say it is its lack of
integration with the desktop. (Can be done with tck, but that is
cumbersome in my humble opinion.)

Maybe you should wonder if PHP is the right language for you based on
what PHP's strong points are, not it weaknesses.

Regards,
Erwin Moller


--
"That which can be asserted without evidence, can be dismissed without
evidence."
-- Christopher Hitchens
Re: What *tasks* are hard for PHP? [message #171974 is a reply to message #171968] Mon, 24 January 2011 17:57 Go to previous messageGo to next message
Tim Streater is currently offline  Tim Streater
Messages: 328
Registered: September 2010
Karma: 0
Senior Member
In article
<e4ec29ef-2048-4a55-949f-2a38a7d50e28(at)v31g2000pri(dot)googlegroups(dot)com>,
axtens <bruce(dot)axtens(at)gmail(dot)com> wrote:

> Okay, so would *you* phrase it, seeing as I'm so dumb? I want a list
> of things that are hard to do in PHP. Can PHP do decision tables? Or
> change from outputting HTML to outputting RTF by just changing one
> instruction (okay, it's not fair to pit PHP against Protium but do you
> get what I mean here?) Okay, one thing I know already: PHP sucks when
> it comes to Unicode. Anything else?

HTML vs. RTF? Well that's essentially a meaningless question, IMO.

Here's PHP outputting some html:

echo "<html><head></head><body><p>Hi Brucey!</body></html>";

Here's PHP outputting some RTF:

echo "Here's some RTF shit - I don't know what it looks like, sorry.";


See what I mean?

--
Tim

"That excessive bail ought not to be required, nor excessive fines imposed,
nor cruel and unusual punishments inflicted" -- Bill of Rights 1689
Re: What *tasks* are hard for PHP? [message #171975 is a reply to message #171967] Mon, 24 January 2011 18:00 Go to previous messageGo to next message
Tim Streater is currently offline  Tim Streater
Messages: 328
Registered: September 2010
Karma: 0
Senior Member
In article
<34f5308e-76ef-425e-8496-4bd3eacf898a(at)p7g2000prb(dot)googlegroups(dot)com>,
axtens <bruce(dot)axtens(at)gmail(dot)com> wrote:

> <sigh> It's just that I've tried Google, have read all sorts of
> interesting things in online manuals. I just haven't had any success
> in formulating the kind of question that gets the information I'm
> after.
>
> However, thank you. Thank you for responding thoughtfully. Much
> appreciated.

Look, I understand the problem. But you have to figure out how to pose
the question. At this point, I have no idea what sort of question you're
trying to ask. Meanwhile:

1) What languages in any have you programmed in, and to what extent?

2) Have you done any of that in PHP?

--
Tim

"That excessive bail ought not to be required, nor excessive fines imposed,
nor cruel and unusual punishments inflicted" -- Bill of Rights 1689
Re: What *tasks* are hard for PHP? [message #171977 is a reply to message #171971] Mon, 24 January 2011 19:20 Go to previous messageGo to next message
Thomas 'PointedEars'  is currently offline  Thomas 'PointedEars'
Messages: 701
Registered: October 2010
Karma: 0
Senior Member
Captain Paralytic wrote:

> For instance, I had no idea that it was hard to do Unicode in php. I
> wish you had told me that before I found it so easy to do Unicode in
> php, because I'd have found something even easier!

Sarcasm aside, you have to admit that *native* support of Unicode is lacking
from PHP while it has been implemented in other languages that are
frequently used on the Web. This does lead to a number of problems between
the different layers of PHP-based web applications, and with porting
applications from one server to another. BTDT.

So if the OP is referring to that fact in their unique way, it is fair to
say that "doing Unicode" is obviously *harder* to do in PHP than in some
other languages (if not impossible with regard to the language tokens),
because you have to do any necessary string conversion yourself, and you
have to stick to US-ASCII-compatible identifiers (an issue that was supposed
to be fixed with PHP 6, more than a decade after e.g. ECMAScript managed to
do it, not to mention Perl and Python):

<http://news.php.net/php.internals/47120>


PointedEars
--
Danny Goodman's books are out of date and teach practices that are
positively harmful for cross-browser scripting.
-- Richard Cornford, cljs, <cife6q$253$1$8300dec7(at)news(dot)demon(dot)co(dot)uk> (2004)
Re: What *tasks* are hard for PHP? [message #171979 is a reply to message #171956] Mon, 24 January 2011 22:40 Go to previous messageGo to next message
Peter H. Coffin is currently offline  Peter H. Coffin
Messages: 245
Registered: September 2010
Karma: 0
Senior Member
On Sun, 23 Jan 2011 18:03:49 -0800 (PST), axtens wrote:


> No flames required. No discussion about language semantics
> or implementation either (if at all possible). I just want to get an
> idea of what can and can't be done with PHP at the task level.

Don't try writing device drivers in it. Don't expect to use it for
critical applications involving life-threatening situations; the
language changes too rapidly and you'll find it impossible to certify to
your insurers that it is correct. It's miserable for real-time control,
or very large-scale data handling that you want finished in an
reasonable time-frame. It's too big to run well on many embedded
controllers. It's too cryptic compared to COBOL, too verbose compared to
well-optimized perl, too slow compared to c.

I'm guessing that this doesn't answer your question, however, because it
sounds like you have something very specific in mind.

--
Whenever you look at a beautiful woman,
always remember that somewhere, someone is tired of her.
Re: What *tasks* are hard for PHP? [message #171980 is a reply to message #171975] Tue, 25 January 2011 04:40 Go to previous messageGo to next message
Bruce M. Axtens is currently offline  Bruce M. Axtens
Messages: 7
Registered: October 2010
Karma: 0
Junior Member
On Jan 25, 2:00 am, Tim Streater <timstrea...@waitrose.com> wrote:
> Look, I understand the problem. But you have to figure out how to pose
> the question. At this point, I have no idea what sort of question you're
> trying to ask. Meanwhile:
>
> 1) What languages in any have you programmed in, and to what extent?
> 2) Have you done any of that in PHP?

Ada [wrote a windows DLL wrapping an interval arithmetic library],
assembler (8080, Z80, 80x86) [wrote various and libraries],
BASIC (CB80, WordBASIC, Visual BASIC, VBScript) [assorted tools over
many years, plus COM DLLs. A lot of the VBScript is on the blog],
C [assorted DLL and COM DLL],
COBOL [learned but (sadly) never got to use. I still play with
OpenCOBOL from time to time],
dBase (II, III, IV, Clipper) [still do a bit of Clipper maintenance
programming],
Delphi [assorted COM DLL wrappers for, e.g. libuninum, libiconv],
Euphoria [various tools, some for cc:Mail],
Fortran [array and matrix manipulation library as COM DLL],
Javascript [recent Adwords-related application],
Perl [assorted wraps of modules using ActiveState's PDK],
PHP [an extension in C for Linux and a wrapper in pure PHP for a
Blowfish encoding application],
Protium [writing plumbing code and testing],
SNOBOL4 [assorted small text manipulation tools].

I have fiddled with a number of other languages. I'm also a researcher
for HOPL <http://hopl.murdoch.edu.au>

I've been programming since 1977. I've developed software for CP/M, MP/
M, DOS, Windows, Linux, and Mac (Classic and X). I work for a small
research and development company based in Perth WA Australia.

Kind regards,
Bruce.
Re: What *tasks* are hard for PHP? [message #171981 is a reply to message #171979] Tue, 25 January 2011 04:43 Go to previous messageGo to next message
Bruce M. Axtens is currently offline  Bruce M. Axtens
Messages: 7
Registered: October 2010
Karma: 0
Junior Member
On Jan 25, 6:40 am, "Peter H. Coffin" <hell...@ninehells.com> wrote:
> On Sun, 23 Jan 2011 18:03:49 -0800 (PST), axtens wrote:
>> No flames required. No discussion about language semantics
>> or implementation either (if at all possible). I just want to get an
>> idea of what can and can't be done with PHP at the task level.
>
> Don't try writing device drivers in it. Don't expect to use it for
> critical applications involving life-threatening situations; the
> language changes too rapidly and you'll find it impossible to certify to
> your insurers that it is correct. It's miserable for real-time control,
> or very large-scale data handling that you want finished in an
> reasonable time-frame. It's too big to run well on many embedded
> controllers. It's too cryptic compared to COBOL, too verbose compared to
> well-optimized perl, too slow compared to c.
>
> I'm guessing that this doesn't answer your question, however, because it
> sounds like you have something very specific in mind.

That's getting a lot closer that most!

Bruce.
Re: What *tasks* are hard for PHP? [message #171983 is a reply to message #171980] Tue, 25 January 2011 11:30 Go to previous messageGo to next message
Tim Streater is currently offline  Tim Streater
Messages: 328
Registered: September 2010
Karma: 0
Senior Member
In article
<46a8b133-5a22-4985-980a-b5bf935c8d9a(at)o14g2000prn(dot)googlegroups(dot)com>,
axtens <bruce(dot)axtens(at)gmail(dot)com> wrote:

> On Jan 25, 2:00
Re: What *tasks* are hard for PHP? [message #171987 is a reply to message #171956] Tue, 25 January 2011 20:59 Go to previous messageGo to next message
Twayne is currently offline  Twayne
Messages: 135
Registered: September 2010
Karma: 0
Senior Member
In news:97691f21-90c5-42a6-8b63-76ae6154883d(at)d23g2000prj(dot)googlegroups(dot)com,
axtens <bruce(dot)axtens(at)gmail(dot)com> typed:
> I've asked this question on my blog. See <http://
> codeaholic.blogspot.com/2011/01/php-what-cant-or-wouldnt-you-do-in-
> php.html>. No flames required. No discussion about language
> semantics or implementation either (if at all possible). I
> just want to get an idea of what can and can't be done with
> PHP at the task level.
>
> Bruce.

It's called, "Do a little research". Tons of info, tuts & opinions already
available on the 'net.
Re: What *tasks* are hard for PHP? [message #171988 is a reply to message #171956] Tue, 25 January 2011 21:02 Go to previous messageGo to next message
Twayne is currently offline  Twayne
Messages: 135
Registered: September 2010
Karma: 0
Senior Member
In news:97691f21-90c5-42a6-8b63-76ae6154883d(at)d23g2000prj(dot)googlegroups(dot)com,
axtens <bruce(dot)axtens(at)gmail(dot)com> typed:
> I've asked this question on my blog. See <http://
> codeaholic.blogspot.com/2011/01/php-what-cant-or-wouldnt-you-do-in-
> php.html>. No flames required. No discussion about language
> semantics or implementation either (if at all possible). I
> just want to get an idea of what can and can't be done with
> PHP at the task level.
>
> Bruce.

It would be easier if you explained what you want to do. Even if someone did
post a list, there would be endless discussion over whether it was valid or
not. Have you even looked at such simple places as wikipedia to get search
terms?
Re: What *tasks* are hard for PHP? [message #171991 is a reply to message #171988] Wed, 26 January 2011 09:17 Go to previous messageGo to next message
The Natural Philosoph is currently offline  The Natural Philosoph
Messages: 993
Registered: September 2010
Karma: 0
Senior Member
Twayne wrote:
> In news:97691f21-90c5-42a6-8b63-76ae6154883d(at)d23g2000prj(dot)googlegroups(dot)com,
> axtens <bruce(dot)axtens(at)gmail(dot)com> typed:
>> I've asked this question on my blog. See <http://
>> codeaholic.blogspot.com/2011/01/php-what-cant-or-wouldnt-you-do-in-
>> php.html>. No flames required. No discussion about language
>> semantics or implementation either (if at all possible). I
>> just want to get an idea of what can and can't be done with
>> PHP at the task level.
>>
>> Bruce.
>
> It would be easier if you explained what you want to do. Even if someone did
> post a list, there would be endless discussion over whether it was valid or
> not. Have you even looked at such simple places as wikipedia to get search
> terms?
>
>
Chap lands light aircraft on field. Farmer wanders up.

"What be that contraption then?"

"Its an AEROPLANE my good man!, I an fly miles in a short time."

"Don't look like its no good to take 30 ton of taters to the market, nor
pull a plough, neither".


Spits derisively and wanders off.
Re: What *tasks* are hard for PHP? [message #172040 is a reply to message #171956] Fri, 28 January 2011 05:16 Go to previous messageGo to next message
P E Schoen is currently offline  P E Schoen
Messages: 86
Registered: January 2011
Karma: 0
Member
"axtens" wrote in message
news:97691f21-90c5-42a6-8b63-76ae6154883d(at)d23g2000prj(dot)googlegroups(dot)com...

> I've asked this question on my blog. See
> < http://codeaholic.blogspot.com/2011/01/php-what-cant-or-wouldnt-you-do-in-p hp.html>.
> No flames required. No discussion about language semantics
> or implementation either (if at all possible). I just want to get an
> idea of what can and can't be done with PHP at the task level.

Most of the comparisons I've found are biased one way or another. Coming
from a background of relatively strongly typed languages such as Borland
Delphi and C, I have found both of these interpreted languages frustrating
and difficult to understand. Here are a few opinions:
http://www.thesitewizard.com/archive/phpvscgi.shtml
http://www.netconcepts.com/php-versus-perl/
http://shlang.com/php-perl-comparison.php
http://www.whenpenguinsattack.com/2006/08/08/php-vs-perl/
http://blogs.computerworld.com/15460/perl_vs_php_vs_ruby
http://www.wikivs.com/wiki/Perl_vs_PHP

It is handy to be able to include PHP within HTML. There are many sometimes
conflicting modules for Perl (such as DateTime). PHP does not seem to have
the equivalent of Strict, Warnings and Taint checking. And I found PHP file
I/O to be simpler (or more C-like):

Here is an example of straightforward and simple file I/O in PHP:
$fHTMLrawfile = "Raw.htm";
$fHTMLraw = fopen($fHTMLrawfile, 'r') or die("can't open file");
if (filesize($fHTMLrawfile) > 0)
$html = fread($fHTMLraw, filesize($fHTMLrawfile));
else
$html = 'N/A';
fclose($fHTMLraw);

A similar operation in Perl requires line by line iteration (or possibly a
lower level function, or reading into an array and then assembling the
string):
if (-e $HTMLpurefile){
open (fHTMLpure, '<', $HTMLpurefile);
my $line;
$in{$key} = "";
while( $line = <fHTMLpure> ){
$in{$key} .= $line;
}
close fHTMLpure; }

I now have a PHP script which is executed within my Perl script, but I might
consider rewriting the entire thing in PHP. Maybe it would be a good
learning experience to try a bit more than a trivial helper script in PHP,
and then I'll be able to make a more educated choice. At this point, I don't
really like either one. Maybe I should just do it in C!

Sorry if this is not exactly on topic or just presents the results of a
search, but I think it's helpful, at least for me, to have this information
on usenet.

Thanks,

Paul
Re: What *tasks* are hard for PHP? [message #172064 is a reply to message #172040] Sat, 29 January 2011 05:50 Go to previous messageGo to next message
Curtis Dyer is currently offline  Curtis Dyer
Messages: 34
Registered: January 2011
Karma: 0
Member
"P E Schoen" <paul(at)pstech-inc(dot)com> wrote:

> "axtens" wrote in message
> news:97691f21-90c5-42a6-8b63-76ae6154883d(at)d23g2000prj(dot)googlegroup
> s.com...
>
>> I've asked this question on my blog. See

<snip>

>> I just want to
>> get an idea of what can and can't be done with PHP at the task
>> level.

Others have already pointed out the issues with the vagueness here.

> Most of the comparisons I've found are biased one way or
> another. Coming from a background of relatively strongly typed
> languages such as Borland Delphi and C, I have found both of
> these interpreted languages frustrating and difficult to
> understand.

<snip>

> It is handy to be able to include PHP within HTML. There are
> many sometimes conflicting modules for Perl (such as DateTime).
> PHP does not seem to have the equivalent of Strict, Warnings and
> Taint checking. And I found PHP file I/O to be simpler (or more
> C-like):

Well, PHP does a decent job when you set the error level to ``E_ALL
| E_STRICT''. As for adding a taint mode, I believe there may be
third-party options, but I haven't searched extensively.

> Here is an example of straightforward and simple file I/O in
> PHP:
> $fHTMLrawfile = "Raw.htm";
> $fHTMLraw = fopen($fHTMLrawfile, 'r') or die("can't open
> file"); if (filesize($fHTMLrawfile) > 0)
> $html = fread($fHTMLraw, filesize($fHTMLrawfile));
> else
> $html = 'N/A';
> fclose($fHTMLraw);

A more straightforward approach (with error checking):

<?php

$file = 'foo.dat';

if (is_readable($file)) {
if (($data = file_get_contents($file)) !== false)
$data = $data ? $data : 'N/A';
}

?>

> A similar operation in Perl requires line by line iteration (or
> possibly a lower level function, or reading into an array and
> then assembling the string):
> if (-e $HTMLpurefile){
> open (fHTMLpure, '<', $HTMLpurefile);
> my $line;
> $in{$key} = "";
> while( $line = <fHTMLpure> ){
> $in{$key} .= $line;
> }
> close fHTMLpure; }

<OT>

Not necessarily that complicated, you can slurp the file into a
string.

# see: perlvar
{
open my $fh, '<', 'foo.dat' or die $!;
local $/ = undef;
my $data = <$fh>;
close $fh;
}

</OT>

> I now have a PHP script which is executed within my Perl script,
> but I might consider rewriting the entire thing in PHP. Maybe it
> would be a good learning experience to try a bit more than a
> trivial helper script in PHP, and then I'll be able to make a
> more educated choice. At this point, I don't really like either
> one. Maybe I should just do it in C!

Unless you feel motivated to take on the academic task of better
learning PHP, or any other language for that matter, I'd recommend
using the language with which you're most comfortable.

<snip>

--
Curtis Dyer
<?$x='<?$x=%c%s%c;printf($x,39,$x,39);?>';printf($x,39,$x,39);?>
Re: What *tasks* are hard for PHP? [message #172068 is a reply to message #172064] Sat, 29 January 2011 07:58 Go to previous messageGo to next message
P E Schoen is currently offline  P E Schoen
Messages: 86
Registered: January 2011
Karma: 0
Member
"Curtis Dyer" wrote in message
news:ii09q8$gi6$1(at)news(dot)eternal-september(dot)org...

> Not necessarily that complicated, you can slurp the file
> into a string.

# see: perlvar
{
open my $fh, '<', 'foo.dat' or die $!;
local $/ = undef;
my $data = <$fh>;
close $fh;
}

> Unless you feel motivated to take on the academic task of
> better learning PHP, or any other language for that matter,
> I'd recommend using the language with which you're most
> comfortable.

Well, to be honest, I don't feel comfortable with either Perl or PHP. There
just seem to be too many arcane and obscure ways to do things, such as the
undef of the line by line file read above. It took me a while to find the
explanation, and to me it seemed like a hack. I have only recently (since
September) even tried to do server side scripting, and I basically found an
old Perl mailer script that did some of what I needed, and built from there.
I have several books on Perl and PHP, and HTML and MySQL and SQLite and
JScript for that matter. Most of them are at least 5-10 years old and
(especially for HTML) they are largely obsolete.

I suppose I've been spoiled by integrated development environments like
Borland Delphi, where I have the convenience of an extensive help menu with
examples and debugger built into the same application as the editor, and
I've been able to build upon a rudimentary general knowledge of the
programming language to add functionality as I need it. I feel most
comfortable when I can understand exactly what is going on, even down to
assembly language and machine code. In fact, I use a lot of assembly
language for simple PIC projects, and a C compiler for more complex projects
such as USB devices.

I started with BASIC and Fortran around 1967, and 15 years later I was using
CP/M, Z80 code, and various forms of BASIC. In 1987 I took a course in
structured programming which featured Pascal, and I used Borland Turbo
Pascal for about a year until I switched to Turbo C, which I used heavily
for MSDOS applications, and I used dBase and Clipper for database stuff. I
didn't like C++ so I discovered Borland Delphi for Windows GUI, and after I
became used to OOP it became my language of choice. However I still use PIC
code and its C compiler, and Z80 code and a C variant for some
microcontroller products. I've also used some VBScript and JavaScript for
some things using the WSH and also in web pages, and VBA for MS Access and
other Windows applications that use it.

So, I'm very new to server-side programming, and I've just found it
difficult to learn. I suppose I'm just somewhat resisting the concept of
context based typing and the myriad of alternate ways to do the same thing,
especially using very cryptic symbols instead of the much more verbose but
more intuitive and human-readable verbosity of Delphi Pascal. I actually
prefer C to some extent, but I've come to accept Delphi as my language of
choice, especially for Windows GUI.

I know I'm rambling on, and probably I should either try recoding my fairly
simple 575 line Perl script into its PHP equivalent, just to be able to
evaluate the relative merits of each for my purposes. I've had more
experience with Perl, if you can use that term to describe my sporadic
attempts to add functionality and fix problems in a server side script with
some parts I still don't really understand.

OK, by now I could have recoded half of that script in PHP. So, thanks for
the response, and maybe I'll check back in a couple of weeks when I have
gone far enough in my attempt to make a decision as to how to proceed.

Paul
Re: What *tasks* are hard for PHP? [message #172069 is a reply to message #172068] Sat, 29 January 2011 10:59 Go to previous messageGo to next message
Tim Streater is currently offline  Tim Streater
Messages: 328
Registered: September 2010
Karma: 0
Senior Member
In article <%MP0p.22457$3K(dot)9265(at)newsfe12(dot)iad>,
"P E Schoen" <paul(at)pstech-inc(dot)com> wrote:

> "Curtis Dyer" wrote in message

> So, I'm very new to server-side programming, and I've just found it
> difficult to learn. I suppose I'm just somewhat resisting the concept of
> context based typing and the myriad of alternate ways to do the same thing,
> especially using very cryptic symbols instead of the much more verbose but
> more intuitive and human-readable verbosity of Delphi Pascal. I actually
> prefer C to some extent, but I've come to accept Delphi as my language of
> choice, especially for Windows GUI.

If you prefer C I'm surprised you're having trouble with PHP, which I
found to be a simplification. Personally I find declaring variables to
be a bore and waste of time, along with worrying about their types.

Nothing nicer than being able to say:

$num = (something, e.g. number of result rows from database query)

$char = "s";
if ($num==1) $char = "";
if ($num==0) $num = "no";

echo "We got " . $num . " result" . $char . "\n");


thereby producing a nice human-friendly message with a small number of
statements. Try doing that in C.

I would avoid perl just for the reason you cite: far too cryptic, and
the people on the perl ng appear to focus solely on the notion of making
their programs *more* cryptic. By contrast the PHP docs site at:

<http://www.php.net/manual/en/>

is an excellent reference source. I've purchased no books on PHP and
only occasionally asked a question here.

I started programming in 1965. During the late 90s I did none at all,
but just 11 years ago, the bloke came up to me and told me I was now the
man for the company's assets database, just being created. He gave me a
quick 30 minute talk about PHP, mySQL, and JavaScript, none of which I'd
ever used, and it was only mySQL that I'd even heard of. But, that intro
was all I needed.

So why are you, with your experience, having trouble with server-side?

Hmmm, I might replace the three statements above with:

$char = $num==1 ? "" : "s";
$num = $num==0 ? "no" : $num;

Got to make the program shorter! :-)

--
Tim

"That excessive bail ought not to be required, nor excessive fines imposed,
nor cruel and unusual punishments inflicted" -- Bill of Rights 1689
Re: What *tasks* are hard for PHP? [message #172070 is a reply to message #172068] Sat, 29 January 2011 13:33 Go to previous messageGo to next message
Leonardo Azpurua is currently offline  Leonardo Azpurua
Messages: 46
Registered: December 2010
Karma: 0
Member
"P E Schoen" <paul(at)pstech-inc(dot)com> wrote:
"Curtis Dyer" wrote in message
news:ii09q8$gi6$1(at)news(dot)eternal-september(dot)org...

> Well, to be honest, I don't feel comfortable with either Perl or
> PHP.
> There just seem to be too many arcane and obscure ways to do
> things, such as the undef of the line by line file read above. It
> took
> me a while to find the explanation, and to me it seemed like a hack.
> I have only recently (since September) even tried to do server side
> scripting, and I basically found an old Perl mailer script that did
> some
> of what I needed, and built from there.

> I suppose I've been spoiled by integrated development environments
> like Borland Delphi, where I have the convenience of an extensive
> help
> menu with examples and debugger built into the same application
> as the editor, and I've been able to build upon a rudimentary
> general
> knowledge of the programming language to add functionality as I need
> it.

Hi,

I have had three "epiphanies" in my life as a PC programmer. The first
was my discovery of Turbo C, mainly because of the highest qualty of
Borland's documentation. The second was Visual Basic 5 (all previous
versions did deserve the "toy language" characterization), and the
third was PHP & JavaScript.

Personally, I tend to dislike strictly typed and static languages. I
know all the advantages they bring by providing consistency checks on
compile time, but having been a C programmer for a couple of decades,
and a vicious user of void * and the like, I am pretty used to do all
those checks by myself and to test extensively.

I also find Perl to be obscure. But PHP has a perfectly consistent
syntax, a very rich set of libraries and so far it has been up to
whatever I have needed (producing server side code and retrieving text
data). It has its quircks (but every language does).

Don't try to "approach PHP from Perl". They are two completely
different beasts, even if they are more or less designed for the same
purpose. Just think of PHP as a sort of hybrid OO/procedural language,
and everything should be easier.

PHP online manual is a finest piece of work. It describes in detail
every "official" library function and every language construct, and
there are community provided examples for most of them.

And the lack of an IDE can easily be solved by having the local help
file open alongside your text editor and just commuting from one to
another, resorting to online help when you need an example.

I haven't tried the PHP plugins fo either NetBeans or Eclipse, but if
they are half as good as they are for Java, then they should be quite
confortable to work with.

Some people complains about the many redundant libraries available in
PHP. But one can test which one best fits one's needs and simply
ignore the rest. I did "C" for twenty years, and VB 5/6 for thirteen,
and I hardly used something like one half of C's libraries and perhaps
80% of VB.

--
Re: What *tasks* are hard for PHP? [message #172074 is a reply to message #172040] Sat, 29 January 2011 18:37 Go to previous messageGo to next message
Twayne is currently offline  Twayne
Messages: 135
Registered: September 2010
Karma: 0
Senior Member
You repeat yourself; every negative you've given to PHP is incorrect as
you've already been advised. Until you know from experience, you're just
guessing. And, you've missed the two most reliable sources on the 'net for
PHP. Where you're "coming from" has almost no meaning to the question you
asked.

HTH,

Twayne`


n news:Qis0p.20671$TZ4(dot)9939(at)newsfe20(dot)iad,
P E Schoen <paul(at)pstech-inc(dot)com> typed:
> "axtens" wrote in message
> news:97691f21-90c5-42a6-8b63-76ae6154883d(at)d23g2000prj(dot)googlegroups(dot)com...
>
>> I've asked this question on my blog. See
>> < http://codeaholic.blogspot.com/2011/01/php-what-cant-or-wouldnt-you-do-in-p hp.html>.
>> No flames required. No discussion about language semantics
>> or implementation either (if at all possible). I just want
>> to get an idea of what can and can't be done with PHP at
>> the task level.
>
> Most of the comparisons I've found are biased one way or
> another. Coming from a background of relatively strongly typed languages
> such as Borland Delphi and C, I have found both of these interpreted
> languages frustrating and difficult to understand. Here are a few
> opinions:
> http://www.thesitewizard.com/archive/phpvscgi.shtml
> http://www.netconcepts.com/php-versus-perl/
> http://shlang.com/php-perl-comparison.php
> http://www.whenpenguinsattack.com/2006/08/08/php-vs-perl/
> http://blogs.computerworld.com/15460/perl_vs_php_vs_ruby
> http://www.wikivs.com/wiki/Perl_vs_PHP
>
> It is handy to be able to include PHP within HTML. There
> are many sometimes conflicting modules for Perl (such as DateTime). PHP
> does
> not seem to have the equivalent of Strict, Warnings and Taint checking.
> And
> I found PHP file I/O to be simpler (or more C-like):
>
> Here is an example of straightforward and simple file I/O
> in PHP: $fHTMLrawfile = "Raw.htm";
> $fHTMLraw = fopen($fHTMLrawfile, 'r') or die("can't
> open file"); if (filesize($fHTMLrawfile) > 0)
> $html = fread($fHTMLraw, filesize($fHTMLrawfile));
> else
> $html = 'N/A';
> fclose($fHTMLraw);
>
> A similar operation in Perl requires line by line iteration
> (or possibly a lower level function, or reading into an array and then
> assembling the string):
> if (-e $HTMLpurefile){
> open (fHTMLpure, '<', $HTMLpurefile);
> my $line;
> $in{$key} = "";
> while( $line = <fHTMLpure> ){
> $in{$key} .= $line;
> }
> close fHTMLpure; }
>
> I now have a PHP script which is executed within my Perl
> script, but I might consider rewriting the entire thing in PHP. Maybe it
> would
> be a good learning experience to try a bit more than a trivial helper
> script in PHP, and then I'll be able to make a more educated choice. At
> this point, I don't really like either one. Maybe I should just do it in
> C!
>
> Sorry if this is not exactly on topic or just presents the
> results of a search, but I think it's helpful, at least for me, to have
> this information on usenet.
>
> Thanks,
>
> Paul
Re: What *tasks* are hard for PHP? [message #172093 is a reply to message #171956] Sun, 30 January 2011 19:18 Go to previous messageGo to next message
joecommodore is currently offline  joecommodore
Messages: 1
Registered: January 2011
Karma: 0
Junior Member
On Jan 23, 6:03 pm, axtens <bruce.axt...@gmail.com> wrote:
> I've asked this question on my blog. See <http://
> codeaholic.blogspot.com/2011/01/php-what-cant-or-wouldnt-you-do-in-
> php.html>. No flames required. No discussion about language semantics
> or implementation either (if at all possible). I just want to get an
> idea of what can and can't be done with PHP at the task level.
>
> Bruce.

PHP is mainly a server side language so anything that does direct
interaction with the client is either difficult or impossible.

Arcade games with PHP is pretty much impossible.

Unless the PHP server is in your local network printing via PHP is
impossible.

Doing remote terminals (i.e. distributed databases) without a newwork
connection is nearly impossible, (you would have to mirror your PHP
server on the remote device, and then deal with syncing when returning
to the main network, so it is very difficult).

Multimedia is not a strong suit for PHP, it can do well making PDFs
some image manipulation and other static documents but is not well
suited for video, sound or animation work. Then again if the right
client application were written to work with a PHP server then you
might have some great stuff, but that isn't just PHP then.

PHP is great for building centralized applications, one of the best
languages for scaling up to the web with data or other such
applications.
Re: What *tasks* are hard for PHP? [message #172108 is a reply to message #172093] Sun, 30 January 2011 22:23 Go to previous messageGo to next message
Tim Streater is currently offline  Tim Streater
Messages: 328
Registered: September 2010
Karma: 0
Senior Member
In article
<dca3cd5a-fc39-4f2a-ac69-fef215fcaeef(at)r4g2000prm(dot)googlegroups(dot)com>,
joecommodore <larry(at)portcommodore(dot)com> wrote:

> On Jan 23, 6:03
Re: What *tasks* are hard for PHP? [message #172144 is a reply to message #172070] Tue, 01 February 2011 00:21 Go to previous messageGo to next message
Curtis Dyer is currently offline  Curtis Dyer
Messages: 34
Registered: January 2011
Karma: 0
Member
On 1/29/2011 5:33 AM, Leonardo Azpurua wrote:

> "P E Schoen" <paul(at)pstech-inc(dot)com> wrote:
> "Curtis Dyer" wrote in message
> news:ii09q8$gi6$1(at)news(dot)eternal-september(dot)org...
>
>> Well, to be honest, I don't feel comfortable with either Perl or PHP.
>> There just seem to be too many arcane and obscure ways to do
>> things, such as the undef of the line by line file read above.

PHP is syntax is more reminiscent of C's. PHP's syntax is generally
more straightforward than Perl's.

One of the guiding principles of Perl is that "There's more than one way
to do it." This means that, while you can use obscure techniques, you
are by no means bound to use them. I very rarely use Perl, but once you
get the basic idea behind a few special variables and learn to look
through the manual efficiently, it's not so bad.

>> I suppose I've been spoiled by integrated development environments
>> like Borland Delphi, where I have the convenience of an extensive help
>> menu with examples and debugger built into the same application
>> as the editor, and I've been able to build upon a rudimentary general
>> knowledge of the programming language to add functionality as I need
>> it.

<snip>

> Don't try to "approach PHP from Perl". They are two completely different
> beasts, even if they are more or less designed for the same purpose.

I may be mistaken, but I don't believe Perl was initially designed with
a primary focus on server-side scripting. PHP, however, was.

<snip>

> I haven't tried the PHP plugins fo either NetBeans or Eclipse, but if
> they are half as good as they are for Java, then they should be quite
> confortable to work with.

I've used the PHP plug-in for Eclipse here and there, although I'm not a
big IDE fan. It seems to be very good, though.

> Some people complains about the many redundant libraries available in
> PHP.

Hm, that's a new one for me. I don't think I've seen any complaints
about redundant libraries. Most of the complaints I've read about PHP's
libraries have been concerning the inconsistent naming conventions.

<snip>

--
"Don't worry about efficiency until you've attained correctness."
- Eric Sosman, c.l.c
Re: What *tasks* are hard for PHP? [message #172148 is a reply to message #172144] Tue, 01 February 2011 13:19 Go to previous message
sheldonlg is currently offline  sheldonlg
Messages: 166
Registered: September 2010
Karma: 0
Senior Member
On 1/31/2011 7:21 PM, Curtis Dyer wrote:
> On 1/29/2011 5:33 AM, Leonardo Azpurua wrote:
>
>> "P E Schoen" <paul(at)pstech-inc(dot)com> wrote:
>> "Curtis Dyer" wrote in message
>> news:ii09q8$gi6$1(at)news(dot)eternal-september(dot)org...
>>
>>> Well, to be honest, I don't feel comfortable with either Perl or PHP.
>>> There just seem to be too many arcane and obscure ways to do
>>> things, such as the undef of the line by line file read above.
>
> PHP is syntax is more reminiscent of C's. PHP's syntax is generally more
> straightforward than Perl's.

Very much like C.

>
> One of the guiding principles of Perl is that "There's more than one way
> to do it." This means that, while you can use obscure techniques, you
> are by no means bound to use them. I very rarely use Perl, but once you
> get the basic idea behind a few special variables and learn to look
> through the manual efficiently, it's not so bad.

I don't know Perl, and in light of that "enthusiastic" recommendation, I
think I'll pass.

>
>>> I suppose I've been spoiled by integrated development environments
>>> like Borland Delphi, where I have the convenience of an extensive help
>>> menu with examples and debugger built into the same application
>>> as the editor, and I've been able to build upon a rudimentary general
>>> knowledge of the programming language to add functionality as I need
>>> it.
>
> <snip>
>
>> Don't try to "approach PHP from Perl". They are two completely different
>> beasts, even if they are more or less designed for the same purpose.
>
> I may be mistaken, but I don't believe Perl was initially designed with
> a primary focus on server-side scripting. PHP, however, was.
>
> <snip>
>
>> I haven't tried the PHP plugins fo either NetBeans or Eclipse, but if
>> they are half as good as they are for Java, then they should be quite
>> confortable to work with.
>
> I've used the PHP plug-in for Eclipse here and there, although I'm not a
> big IDE fan. It seems to be very good, though.

It is excellent. Besides everything else it has great integration with
CMS. Also, it has a memory and you can recover previous editing changes
that were lost. This recovery feature has helped me on more than one
occasion.

>
>> Some people complains about the many redundant libraries available in
>> PHP.
>
> Hm, that's a new one for me. I don't think I've seen any complaints
> about redundant libraries. Most of the complaints I've read about PHP's
> libraries have been concerning the inconsistent naming conventions.

<sigh>. I always check with the "bible" (php.net) when using many
different functions just for that reason.

--
Shelly
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Sanitising input
Next Topic: php include question
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Sat Nov 09 00:57:58 GMT 2024

Total time taken to generate the page: 0.03255 seconds