I thought PHP 4 and 5 don't support the goto statement. But I found www.us3.php.net has a description on it. Which way is true?
If you read the page completely, goto is a new statement since PHP 5.3 - it won't work in earlier versions.
I can tell you why: Simply put your working on some code and you decide you need to see how something would run by skipping over a section of code. Before php 5.3 you had to cut the data out, save it and test it. Now you can just add 2 lines to your code (very short lines at that) and save your self a butt load of work. There are also applications in the while loop that it would be nice to have a jump out feature from one while loop to another section of code.
fair enough, I usually just comment out sections or put a $temptag with an if statement (ie if $temptag =true{}else{}) I can see how a goto tag could be useful for testing to save time
Adding a multi-line comment is two lines. Even smaller than goto lines. I've thought of things goto would be nice for from time to time, but I always find a reason why it would make it harder in the long run down the road to use the goto. It's like using duct tape to patch an innertube in a bike tire instead of just replacing the tube.
Hey duct tape works really well. Don't dodge it until you've had to use it... Anyway your probably right, but they are still trying to make php better so don't shoot them because their newest features aren't the "world's greatest." I'd rather they keep making php better and more advanced than drop it like hypervm.