There are times where a GOTO is really the most efficient way to get out
of a deeply nested set of loops or switches where the overhead of adding
the additional checks at each level would be painful. There are 1125 gotos
in the PHP C code. But, PHP has multi-level breaks to get around this
situation.

-Rasmus

On Wed, 12 Jun 2002, Martin Towell wrote:

> 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:[EMAIL PROTECTED]]
> Sent: Wednesday, June 12, 2002 8:34 AM
> To: [EMAIL PROTECTED]
> 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
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to