Новости | Документация | Download | Webboard | FAQ | Поиск | Контакты


goto

The goto operator can be used to jump to other instruction in the program. The target place is specified by the label and a colon and goto is followed by that label.

Пример #1 goto example

<?php
goto a;
echo 
'Foo';
 
a:
echo 
'Bar';
?>

Результат выполнения данного примера:

Bar

Замечание: The goto operator is available since PHP 5.3.

Внимание

It is not allowed to jump into loop or switch statement. Fatal error is issued in such case.






  Copyright Apache.ru © 1999-2017, All Rights Reserved Разработка сайта: Inside.ru  
  РЕКЛАМА НА САЙТЕ: |