Added the goto operator in PHP5.3. The gotogoto operator can be used to jump to a specified position in the program. You can add a colon to the target location. The goto in PHP has certain restrictions. it can only be in the same file goto
The goto operator can be used to jump to a specified position in the program. You can add a colon to the target location. PHP has certain restrictions on goto. you can only jump to the same file and scope. that is to say, you cannot jump out of one function or class method, or jump to another function. You cannot jump into any loop or switch structure. A common usage is to jump out of a loop or switch, which can replace multiple levels of break.
Eg.
Goto;
Echo 'foo ';
A:
Echo 'bar ';
?> // Bar
Note:
The goto operator is only valid in PHP 5.3 and later versions.
Author: "My PHP path"
The http://www.bkjia.com/PHPjc/478651.htmlwww.bkjia.comtruehttp://www.bkjia.com/PHPjc/478651.htmlTechArticlegoto goto operator can be used to jump to a specified position in the program. You can add a colon to the target location. The goto in PHP has certain restrictions. it can only be in the same file...