Re: Whacky increment/assignment logic with $foo++ vs ++$foo
| From: | Robert Cummings | Date: | Wed, 07 Oct 2009 02:20:16 +0000 |
| Subject: | Re: Whacky increment/assignment logic with $foo++ vs ++$foo | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-298705@lists.php.net to get a copy of this message | ||
Andrea Giammarchi wrote:
If you read the archives for PHP Internals you can view the discussion that went into the final decision to include GOTO. It happened 2 or 3 years ago and I was certainly on the side arguing in its favour. The GOTO used in languages such as C and now PHP, is not the bastard GOTO of BASIC yesteryear. There are certainly use cases where the use of GOTO makes far more sense than other constructs. Finite state machines (often used in parsing) are one such place. In fact if you grep for goto on any major open source project's C code, you will probably find multiple occurrences. PHP, MySQL, and Apache all use goto. Cheers, Rob. -- http://www.interjinn.com Application and Templating Framework for PHPif used properly, could avoid recursion, and speed up operations ... there is nothing wrong with goto, everything we write on lowest level is a jump in the memory (as goto is a jump in the code flow) ++goto ... and not goto++I forgot, I have always used goto in Batch script, which indeed can emulates functions, except there is no recursion problem. I have a couple of batches online if interesting, and from performances point of view, ask yourself why on earth PHP core developers have introduced goto and actually somebody is using it ;-) Uh, I forgot I live in microoptimization land ... lol