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

Home » Imported messages » comp.lang.php » terminate a PHP script
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: terminate a PHP script [message #172539 is a reply to message #172530] Mon, 21 February 2011 17:37 Go to previous messageGo to previous message
Jerry Stuckle is currently offline  Jerry Stuckle
Messages: 2598
Registered: September 2010
Karma:
Senior Member
On 2/21/2011 11:51 AM, n00m wrote:
>> No, you should not use goto! It causes more problems than it solves.
>
> Why on the earth???
> "goto" can produce 10000 empty lines in no time. Like this:
>
>
> $cnt = 0;
>
> mm:
> ++$cnt;
> echo '<BR>';
> if ($cnt< 10000) goto mm;
>
>
> ============
> HTH =)
>
> PS
> I'd suggest some variations of goto. E.g.:
>
> 1) goto_but_later_on
> 2) goto_two_times
> 3) goto_and_never_come_back
> 4) goto_and_come_back_with_no_delay
> 5) goto_and_see_what_happened_out_there(report_needed=YES/NO)
>
>
>
>
>
>
>
>
>

goto is NEVER needed, and SELDOM a good thing to use. It completely
violates structured programming practices and causes more problems than
it solves.

Even Kernighan and Ritchie in their book "The C Programming Language"
(on which PHP was originally based) recommend against using goto.


--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex(at)attglobal(dot)net
==================
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Extralight browser-webserver communication via cookies (+)
Next Topic: Storing multiple character set types (or a representation of em) in a table column
Goto Forum:
  

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

Current Time: Wed Nov 27 01:58:35 GMT 2024

Total time taken to generate the page: 0.04798 seconds