RE: [PHP] GOTO command. Doest it exist?
| From: | Martin Towell | Date: | Tue, 11 Jun 2002 23:44:01 +0000 |
| Subject: | RE: [PHP] GOTO command. Doest it exist? | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-101644@lists.php.net to get a copy of this message | ||
I've found that any language that supports "while", "do/while",
"for" and
"if/else" as well as functions/subroutines doesn't need "goto".
IMO, you should be able to do code using just those basic elements
(sequence, loops, conditions -> basic flowchart "commands")
just my 2c worth
-----Original Message-----
From: David Freeman [mailto:dfreeman@outbackqld.net.au]
Sent: Wednesday, June 12, 2002 8:34 AM
To: php-general@lists.php.net
Subject: RE: [PHP] GOTO command. Doest it exist?
> I do beg your pardon... But does PHP not have GOTO command?
Why do you need one? In my experience, going right back to BASIC over
10 years ago, it's rarely _necessary_ to have a goto.
In php I suspect you'd get similar functionlity out of either include()
for creating functions.
Not using goto tends to promote readability of program flow also, always
a good thing imho.
Each programming language is different and each has it's own advantage,
disadvantages and is particularly suited to certain uses. A good
programmer works with the tools available rather than worrying over
language differences. Just my own opinion and I don't really expect
anyone else to agree.
CYA, Dave
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php