Tower Tower - 1 year ago 129
PHP Question

Is GOTO in PHP evil?

I recently found out that PHP 5.3 supports new language construct called

. Everybody knows what it does. However, it's not exactly the traditional
, it's just a jump label. I'm interesting in knowing whether this
is evil and implies bad code?

Answer Source

Unless you are programming in assembler, GOTO should always be treated the same way as the life vest of the airplanes: it is good to have them available, but if you need to use them it means that you are in big trouble.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download