RE: The "goto" discussion on the Internals List

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



[snip]
Absolutely nobody in this day and age advocated "goto <lineNumber>". The
only use to have useful advantage is "goto <labelName>" and of course
that is where the <labelName> exists within the current execution scope.

A function call is not an acceptable replacement since you incure the
overhead of setting up the function and the stack. Contrast the
difference in speed between "is_null( $foo )" and "$foo === null".
[/snip]

The speed difference is negligible though, in this day and age,
dependent upon how much hair-splitting you would care to do. You're
still setting aside a block of code which will have to be parsed and you
incur the same setup if the goto section is the same code as the
function. The overhead is introduced in the calling of the function. But
we're splitting hairs here :)

[snip]
PHP has never purported to be an OOP only language. It advocates both
procedural and OOP programming methodologies. Just ask Richard Lynch :)
[/snip]

I never said that PHP was OOP only, I was just pointing out how,
historically, the goto was depricated.

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



[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux