« PHP 8.3 Manual トップ
著作権 »
per page, with , order by , clip by
Results of 1 - 10 of about 10 for goto (0.003 sec.)
goto | PHP 8.3 14194
goto (PHP 5 >= 5.3.0, PHP 7, PHP 8) この画像は » xkcd から提供いただいたものです。 goto 演算子を使用すると、 プログラム中の他の命令にジャンプすることができます。 ジャンプ先はラベルとコロンで表し、 goto の後にそのラベルを指定します。 ラベルは ... 大文字小文字を 区別します 。 これは、完全に制約のない goto というわけではありません。 対象となるラベルは同じファイル上の同じコンテキストになければなりません。 つまり、関数やメソッド ... や switch 構造の中にも突入することができません。 逆にループや switch 構造から抜け出すことはできます。一般的な用法としては、 goto を複数レベルの break として使うものがあります。 例1 goto の例 <?php goto a ; echo 'Foo' ; a : echo 'Bar' ; 上の例の出力は以 ... 下となります。 Bar 例2 ループでの goto の例 <?php for ( $i = 0 , $j = 50 ; $i < 100 ; $i ++) { while ( $j --) { if ( $j == 17 ) { goto end ; } } } echo "i = $i " ...
https://man.mtool.work/php/8.3/control-structures.goto.html
The Parle\Parser class | PHP 8.3 8724
The Parle\Parser class (PECL parle >= 0.5.1) はじめに Parser class. Rules can be defined on the fly. Once finalized, a Parle\Lexer instance is required to deliver the token stream. クラス概要 class Parle\Parser { /* 定数 */ const int ACTION ... _ERROR = 0 ; const int ACTION_SHIFT = 1 ; const int ACTION_REDUCE = 2 ; const int ACTION_GOTO = 3 ; const int ACTION_ACCEPT = 4 ; const int ERROR_SYNTAX = 0 ; const int ERROR_NON_ASSOCIATIVE = 1 ; const int ERROR_UNK ... bool } 定義済み定数 Parle\Parser::ACTION_ERROR Parle\Parser::ACTION_SHIFT Parle\Parser::ACTION_REDUCE Parle\Parser::ACTION_GOTO Parle\Parser::ACTION_ACCEPT Parle\Parser::ERROR_SYNTAX Parle\Parser::ERROR_NON_ASSOCIATIVE Parle\Parser::ERROR_UNKNOWN_TOK ...
https://man.mtool.work/php/8.3/class.parle-parser.html
The Parle\RParser class | PHP 8.3 8724
The Parle\RParser class (PECL parle >= 0.7.0) はじめに Parser class. Rules can be defined on the fly. Once finalized, a Parle\RLexer instance is required to deliver the token stream. クラス概要 class Parle\RParser { /* 定数 */ const int ACT ... ION_ERROR = 0 ; const int ACTION_SHIFT = 1 ; const int ACTION_REDUCE = 2 ; const int ACTION_GOTO = 3 ; const int ACTION_ACCEPT = 4 ; const int ERROR_SYNTAX = 0 ; const int ERROR_NON_ASSOCIATIVE = 1 ; const int ERROR_UNK ... } 定義済み定数 Parle\RParser::ACTION_ERROR Parle\RParser::ACTION_SHIFT Parle\RParser::ACTION_REDUCE Parle\RParser::ACTION_GOTO Parle\RParser::ACTION_ACCEPT Parle\RParser::ERROR_SYNTAX Parle\RParser::ERROR_NON_ASSOCIATIVE Parle\RParser::ERROR_UNKNOWN ...
https://man.mtool.work/php/8.3/class.parle-rparser.html
制御構造 | PHP 8.3 8670
制御構造 目次 はじめに if else elseif/else if 制御構造に関する別の構文 while do-while for foreach break continue switch match declare return require include require_once include_once goto throw try...catch finally 他のマニュアルの関連ページ ...
https://man.mtool.work/php/8.3/language.control-structures.html
Parser examples | PHP 8.3 8545
Parser examples 例1 Simple calculator <?php use Parle \{ Parser , ParserException , Lexer , Token }; $p = new Parser ; $p -> token ( "INTEGER" ); $p -> left ( "'+' '-' '*' '/'" ); $p -> push ( "start" , "exp" ); $prod_add = $p -> push ( "ex ... :: ACTION_ERROR : throw new ParserException ( "Parser error" ); break; case Parser :: ACTION_SHIFT : case Parser :: ACTION_GOTO : case Parser :: ACTION_ACCEPT : break; case Parser :: ACTION_REDUCE : switch ( $p -> reduceId ) { case $prod_add : $l = $ ... Parser :: ACTION_ERROR : throw new ParserException ( "Error" ); break; case Parser :: ACTION_SHIFT : case Parser :: ACTION_GOTO : /* var_dump($p->trace());*/ break; case Parser :: ACTION_REDUCE : $rid = $p -> reduceId (); if ( $rid == $prod_word_1 ) ...
https://man.mtool.work/php/8.3/parle.examples.parser.html
パーサートークンの一覧 | PHP 8.3 8420
パーサートークンの一覧 PHP 言語の種々の部分は、内部的に トークン で表現されています。 不正なトークンのシーケンスが含まれるコードスニペットの場合、 Parse error: syntax error, unexpected token "==", expecting "(" in script.php on line 10." の ... reach T_FUNCTION ( int ) function 関数 T_FUNC_C ( int ) __FUNCTION__ マジック定数 T_GLOBAL ( int ) global 変数のスコープ T_GOTO ( int ) goto goto T_HALT_COMPILER ( int ) __halt_compiler() __halt_compiler T_IF ( int ) if if T_IMPLEMENTS ( int ) implem ...
https://man.mtool.work/php/8.3/tokens.html
キーワードのリスト | PHP 8.3 8223
キーワードのリスト これらのキーワードは、PHP では特別な意味があります。これらのいくつかは 関数やメソッドのようなものを表し、いくつかは定数のようなものを表す、 といったようになっていますが、実際にはそうではありません。実際には、 これらは言語 ... dfor endforeach endif endswitch endwhile eval() exit() extends final finally fn (PHP 7.4 以降) for foreach function global goto if implements include include_once instanceof insteadof interface isset() list() match (PHP 8.0 以降) namespace new or pri ...
https://man.mtool.work/php/8.3/reserved.keywords.html
do-while | PHP 8.3 8170
do-while (PHP 4, PHP 5, PHP 7, PHP 8) do-while ループは、論理式のチェックが各反復の 最初ではなく最後に行われること以外は、 while ループと 全く同じです。通常の while ループとの主な差は、 do-while ループは最低1回の実行を保証されていることです ... cho $i . "はOKです。\n" ; /* i を処理します */ } while ( 0 ); 上の例の出力は以下となります。 25はOKです。 この技のかわりに goto 演算子を使うこともできます。 他のマニュアルの関連ページ Python controlflow Linux JM factor(6) Linux JM factor(1) Python co ...
https://man.mtool.work/php/8.3/control-structures.do.while.html
言語リファレンス | PHP 8.3 7901
言語リファレンス 基本的な構文 PHP タグ HTML からの脱出 命令の分離 コメント 型 はじめに 型システム NULL 論理型 (boolean) 整数 浮動小数点数 文字列 数値形式の文字列 配列 オブジェクト 列挙型 / Enum リソース コールバック / Callable Mixed Void Ne ... する別の構文 while do-while for foreach break continue switch match declare return require include require_once include_once goto throw try...catch finally 関数 ユーザー定義関数 関数のパラメータと引数 戻り値 可変関数 内部(ビルトイン)関数 無名関数 アロ ...
https://man.mtool.work/php/8.3/langref.html
サンプル | PHP 8.3 7723
サンプル マニュアル内の全サンプルの一覧 Example#0 - 初歩的な例 Example#1 - 初めての PHP スクリプト: hello.php Example#2 - PHP からシステムに関する情報を取得する Example#3 - 変数を出力する (配列要素) Example#4 - 制御構造 および 関数の使用例 ... 216 - include と return 文 Example#217 - 出力バッファリングを用い、 PHP ファイルの内容を文字列として読み込む Example#218 - goto の例 Example#219 - ループでの goto の例 Example#220 - これは動作しません Example#221 - Throwable ではないオブジェクトをスロ ...
https://man.mtool.work/php/8.3/indexes.examples.html
PREV 1 NEXT