Branching and looping1. If the judging conditionIs_bool (): Determines whether it is a Boolean typeIs_int (), Is_integer (), and Is_long (): Determines whether it is an integral type.Is_float (), is_double (), and Is_real (): Determines whether it
The goto operator is a new feature added after php5.3+ to jump to another location in the program; the usage is simple: goto followed by a flag with the target location, with a colon marked at the destination, as follows:
Copy Code code as
PHP's GOTO syntax redirects to a specified position, as shown in the code, goto display defines a display after the code, so that when the goto display statement is executed, it will jump to the place where the display is defined to start execution.
This article mainly introduces what is the PHP goto statement and goto operator usages, need friends can refer to the followingThe goto operator can be used to jump to a specified position in a program. The target location can be marked with a colon
The goto operator can be used to jump to a specified position in a program. The target location can be marked with a colon for the target name. The Goto in PHP has a certain limit and can only jump in the same file and scope, which means you can't
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
The goto operator is added after PHP5.3 +. It is used to jump to another position of the program. Its usage is simple: The goto operator is followed by the target position mark, and the target name is marked with a colon, as shown below:
Copy
(Like 04 years) in July 29, Sara released a goto declaration patch (adding a GOTO statement to PhP) in the newsgroup, which immediately caused a strong sensation in the newsgroup, just like Goto in C, there are both advantages and
Not commonly used? Why? Not commonly used?
Why?
Reply content:
Not commonly used?Why?
Goto should not be used, but should be used with caution. Similar to the language features such as goto, proper use is no problem.
However, if you abuse
Do is a multi-conditional judgment of the small thing, in order to structure clear, easy to expand, want to use if else, each other with Goto jump into the next condition, each piece of code has been tested normal, such as the following directly in
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.