goto

suggest change

The goto operator allows to jump to another section in the program. It’s available since PHP 5.3.

The goto instruction is a goto followed by the desired target label: goto MyLabel;.

The target of the jump is specified by a label followed by a colon: MyLabel:.

This example will print Hello World!:

<?php
goto MyLabel;
echo 'This text will be skipped, because of the jump.';
 
MyLabel:
echo 'Hello World!';
?>

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:


Control structures:
* goto
* while
* return
* for
* if
* switch

Table Of Contents
2 Arrays
4 Types
10 Cookies
14 JSON
15 SOAP
17 cURL
19 XML
21 Traits
35 UTF-8
36 URLs
38 PHPDoc
41 Loops
42 Control structures
44 Closur
72 YAML
77 Cache
78 Streams
81 PDO
82 SQLite3
83 Sockets
87 MongoDB
93 IMAP
94 Redis
95 Imagick
102 APCu
108 PSR