EK>>This might be from implementation/engine point of view, but from user's
EK>>perspective goto is much more limited. It can only happen within one
EK>>function.

That's good. PHP is a limited language - you can not do many things in PHP 
that you can do in C, for example. Many of these things usually are called 
"bugs" when people do them :) 

EK>>Exception on the other hand might take code execution into totally
EK>>different file which is why I guess it feels much less restricted that goto.

Exceptions never should be used "to take execution into different file". 
That's not their purpose and if you plan to use them with this intention 
- don't. Exceptions are meant for the thrower - to signal that situation 
does not allow for the current function to continue execution and for the 
catcher - to deal with the exceptional situation respectively. It's 
purpose is to handle exceptional situation, not to pass control around - 
which is exactly the purpose of goto. And the reason why I don't like it.

-- 
Stanislav Malyshev, Zend Products Engineer
[EMAIL PROTECTED]  http://www.zend.com/ +972-3-6139665 ext.115

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to