News Feed
Jobs Feed
Sections




News Archive
Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Timothy Boronczyk's Blog:
Goto and Exceptions
March 24, 2009 @ 12:57:12

Timothy Boronczyk has written up a nice post about two practical uses of the "goto" syntax in the upcoming PHP 5.3 release of the popular web scripting language.

Yet goto can still be useful under certain circumstances. For example, some programmers use goto to direct the execution flow to dedicated error-handling logic elsewhere in a program in languages that lack exception handling (such as C).

His two examples are to: emulate exception handling in a procedural environment and to overcome perceived limitations with try/catch. He adds in some code comparing the "without goto" and "with goto" versions of the same code showing how the exception handling might be handled differently.

0 comments voice your opinion now!
goto exception oop example trycatch


blog comments powered by Disqus

Similar Posts

Cocoliso's Blog: Adding A Syntax Highlighter To Your Site: The Power Of Geshi

PHPBuilder.com: A Primer On Postgres Exception Handling For The PHP Developer, Part 2

Leonid Mamchenkov's Blog: PHP regular expression to match English/Latin characters only

Voices of the ElePHPant: Interview #2 with Larry Garfield : Drupal 8 & Object Oriented Programming

Pádraic Brady's Blog: Complex Views with the Zend Framework - Part 2: View Helper Pattern


Community Events











Don't see your event here?
Let us know!


symfony2 unittest framework application hhvm introduction series podcast code opinion example hack security install facebook component release language composer package

All content copyright, 2014 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework