タグ

関連タグで絞り込む (0)

  • 関連タグはありません

タグの絞り込みを解除

PROGRAMMINGとProgrammingとITに関するItisangoのブックマーク (1,026)

  • PHP: function_exists - Manual

    Getting Started Introduction A simple tutorial Language Reference Basic syntax Types Variables Constants Expressions Operators Control Structures Functions Classes and Objects Namespaces Enumerations Errors Exceptions Fibers Generators Attributes References Explained Predefined Variables Predefined Exceptions Predefined Interfaces and Classes Predefined Attributes Context options and parameters Su

    PHP: function_exists - Manual
  • PHP: 内部(ビルトイン)関数 - Manual

    Getting Started Introduction A simple tutorial Language Reference Basic syntax Types Variables Constants Expressions Operators Control Structures Functions Classes and Objects Namespaces Enumerations Errors Exceptions Fibers Generators Attributes References Explained Predefined Variables Predefined Exceptions Predefined Interfaces and Classes Predefined Attributes Context options and parameters Su

    PHP: 内部(ビルトイン)関数 - Manual
    Itisango
    Itisango 2023/08/10
    多くの関数と言語構造を持っています。他にも コンパイル済みの特定のPHP拡張モジュールを必要とする関数があります。 もしコンパイルされていなければ"undefined function(未定義の関数)" として致命的エラーを発する
  • PHP: 可変関数 - Manual

    可変関数 PHP は可変関数(variable functions)の概念をサポートします。 これにより、変数名の後に括弧が付いている場合、その値が何であろうと PHPは、同名の関数を探し実行を試みます。 この機能は、コールバック、関数テーブル等を実装するために使用可能です。 可変関数は、echo, print, isset(), empty(), include, require のような言語構造と組み合わせて使用する ことはできません。これらの言語構造を可変変数として使うには 独自のラッパー関数を使う必要があります。 <?php function foo() { echo "In foo()<br />\n"; } function bar($arg = '') { echo "In bar(); argument was '$arg'.<br />\n"; } // これは、echo

    PHP: 可変関数 - Manual
    Itisango
    Itisango 2023/08/10
    可変関数(variable functions)の概念をサポートします。 変数名の後に括弧が付いている場合、その値が何であろうと PHPは、同名の関数を探し実行を試みます。 コールバック、関数テーブル等を実装するために使用可能です
  • PHP: 返り値 - Manual

    Getting Started Introduction A simple tutorial Language Reference Basic syntax Types Variables Constants Expressions Operators Control Structures Functions Classes and Objects Namespaces Enumerations Errors Exceptions Fibers Generators Attributes References Explained Predefined Variables Predefined Exceptions Predefined Interfaces and Classes Predefined Attributes Context options and parameters Su

    PHP: 返り値 - Manual
    Itisango
    Itisango 2023/08/10
    配列やオブジェクトを含むあらゆる型を返すことができます。 これにより、関数の実行を任意の箇所で終了し、その関数を呼び出した 箇所に制御を戻すことが出来ます。注意:return を省略した場合は null を返します。
  • PHP: 関数の引数 - Manual : 可変長引数リスト

    Getting Started Introduction A simple tutorial Language Reference Basic syntax Types Variables Constants Expressions Operators Control Structures Functions Classes and Objects Namespaces Enumerations Errors Exceptions Fibers Generators Attributes References Explained Predefined Variables Predefined Exceptions Predefined Interfaces and Classes Predefined Attributes Context options and parameters Su

    PHP: 関数の引数 - Manual : 可変長引数リスト
    Itisango
    Itisango 2023/08/10
    左から右の順番で行われます(先行評価)。 PHP は、値渡し(デフォルト)、 リファレンス渡し、 デフォルト引数値 をサポートしています。また、 可変長引数リスト や、 名前付き引数 もサポートしています。
  • PHP: ユーザー定義関数 - Manual

    Getting Started Introduction A simple tutorial Language Reference Basic syntax Types Variables Constants Expressions Operators Control Structures Functions Classes and Objects Namespaces Enumerations Errors Exceptions Fibers Generators Attributes References Explained Predefined Variables Predefined Exceptions Predefined Interfaces and Classes Predefined Attributes Context options and parameters Su

    PHP: ユーザー定義関数 - Manual
    Itisango
    Itisango 2023/08/10
    function foo($arg_1, $arg_2, /* ..., */ $arg_n) { echo "関数の例\n"; return $retval; }
  • PHP: goto - Manual

    Getting Started Introduction A simple tutorial Language Reference Basic syntax Types Variables Constants Expressions Operators Control Structures Functions Classes and Objects Namespaces Enumerations Errors Exceptions Fibers Generators Attributes References Explained Predefined Variables Predefined Exceptions Predefined Interfaces and Classes Predefined Attributes Context options and parameters Su

    PHP: goto - Manual
    Itisango
    Itisango 2023/08/10
    対象となるラベルは同じファイル上の同じコンテキストになければなりません。 つまり、関数やメソッドの外に飛び出したり 関数やメソッドの中に突入したりすることはできないということです
  • PHP: include_once - Manual

    include_once (PHP 4, PHP 5, PHP 7, PHP 8) include_once 式は、スクリプトの実行時に指定 したファイルを読み込み評価します。この動作は include 式と似ていますが、ファイルからのコー ドが既に読み込まれている場合は、再度読み込まれずに include_once は true を返すという点のみが異なります。その名が示す通り、ファイルは一度しか読み込まれません。 include_once は、スクリプトの実行時に同じファイ ルが複数回読み込まれ、評価される可能性がある場合に、関数の再定義や 変数値の再代入といった問題を回避するために一回だけ読み込ませるため に使用します。 この関数の動作についての情報は include のドキュメントを参照ください。

    PHP: include_once - Manual
    Itisango
    Itisango 2023/08/10
    include_once は、スクリプトの実行時に同じファイ ルが複数回読み込まれ、評価される可能性がある場合に、関数の再定義や 変数値の再代入といった問題を回避するために一回だけ読み込ませるため に使用します。
  • PHP: require_once - Manual

    If your code is running on multiple servers with different environments (locations from where your scripts run) the following idea may be useful to you: a. Do not give absolute path to include files on your server. b. Dynamically calculate the full path (absolute path) Hints: Use a combination of dirname(__FILE__) and subsequent calls to itself until you reach to the home of your '/index.php'. The

    PHP: require_once - Manual
    Itisango
    Itisango 2023/08/10
    require_once 式は require とほぼ同じ意味ですが、 ファイルがすでに読み込まれているかどうかを PHP がチェックするという点が異なります。 すでに読み込まれている場合はそのファイルを読み込みません
  • PHP: include - Manual

    Getting Started Introduction A simple tutorial Language Reference Basic syntax Types Variables Constants Expressions Operators Control Structures Functions Classes and Objects Namespaces Enumerations Errors Exceptions Fibers Generators Attributes References Explained Predefined Variables Predefined Exceptions Predefined Interfaces and Classes Predefined Attributes Context options and parameters Su

    PHP: include - Manual
    Itisango
    Itisango 2023/08/10
    指定されたパスから行います。パスを指定しない場合は、 include_path の設定を利用します。 ファイルが include_path に見つからないときは、include は呼び出し元スクリプトのディレクトリと現在の作業ディレクトリも探します
  • PHP: require - Manual

    Getting Started Introduction A simple tutorial Language Reference Basic syntax Types Variables Constants Expressions Operators Control Structures Functions Classes and Objects Namespaces Enumerations Errors Exceptions Fibers Generators Attributes References Explained Predefined Variables Predefined Exceptions Predefined Interfaces and Classes Predefined Attributes Context options and parameters Su

    PHP: require - Manual
    Itisango
    Itisango 2023/08/10
    include とほぼ同じですが、失敗した場合に E_COMPILE_ERROR レベルの致命的なエラーも発生するという点が異なります。 つまり、スクリプトの処理がそこで止まってしまうということです。一方 include の場合は、警告 (E_WARNING)
  • PHP: return - Manual

    Getting Started Introduction A simple tutorial Language Reference Basic syntax Types Variables Constants Expressions Operators Control Structures Functions Classes and Objects Namespaces Enumerations Errors Exceptions Fibers Generators Attributes References Explained Predefined Variables Predefined Exceptions Predefined Interfaces and Classes Predefined Attributes Context options and parameters Su

    PHP: return - Manual
    Itisango
    Itisango 2023/08/10
    グローバルスコープで呼び出されると、現在実行中のスクリプトが終了 します。もしそのスクリプトが include もしくは require されたものである場合、制御は呼び出し元 のファイルに戻ります
  • PHP: declare - Manual

    Getting Started Introduction A simple tutorial Language Reference Basic syntax Types Variables Constants Expressions Operators Control Structures Functions Classes and Objects Namespaces Enumerations Errors Exceptions Fibers Generators Attributes References Explained Predefined Variables Predefined Exceptions Predefined Interfaces and Classes Predefined Attributes Context options and parameters Su

    PHP: declare - Manual
    Itisango
    Itisango 2023/08/10
    現在のところ、使用できるディレクティブは ticks ( ticksに関しては以下を参照ください)、 encoding (encoding に関しては以下を参照ください)、 strict_types (型宣言のページの 厳密な型付け も参照ください) です
  • PHP: match - Manual

    Getting Started Introduction A simple tutorial Language Reference Basic syntax Types Variables Constants Expressions Operators Control Structures Functions Classes and Objects Namespaces Enumerations Errors Exceptions Fibers Generators Attributes References Explained Predefined Variables Predefined Exceptions Predefined Interfaces and Classes Predefined Attributes Context options and parameters Su

    PHP: match - Manual
    Itisango
    Itisango 2023/08/10
    (==)ではなく、 型と値の一致チェック(===) に基づいて行われます。 match 式は PHP 8.0.0 以降で利用可能です。 例1 match 式の構造 <?php $return_value = match (制約式) { 単一の条件式 => 返却式, 条件式1, 条件式2 => 返却式, };
  • PHP: switch - Manual

    switch (PHP 4, PHP 5, PHP 7, PHP 8) switch文は、同じ式を用いてIF文を並べたのに似ています。 同じ変数を異なる値と比較し、値に応じて異なったコードを実行したいと 思うことがしばしばあるかと思います。 switch文は、まさにこのためにあるのです。 注意: 他の言語とは違って、 continue命令は switch にも適用され、breakと同じ動作をします。 ループの内部で switch を使用しており、 外側のループの処理を続行させたい場合には、continue 2 を使用してください。 注意: switch/case が行うのは、 緩やかな比較 であることに注意しましょう。 次の二つの例は、同じことを二つの異なった方法で書いたものです。 一つは、if と elseif文を、 もう一つはswitch文を使っています。 どちらも、出力は同じです。

    PHP: switch - Manual
    Itisango
    Itisango 2023/08/10
    case に与える値は、式であっても構いません。 しかし、式はそれ自体が実行され、 その結果が swtich に与えた値と緩やかに比較されます。 これは、switch に与える値の複雑な評価には使えないということです。
  • PHP: continue - Manual

    continue (PHP 4, PHP 5, PHP 7, PHP 8) continue は、ループ構造において現在の繰り返しループ の残りの処理をスキップし、条件式を評価した後に 次の繰り返しの最初から実行を続けるために使用されます、 注意: PHP では、continue の動作に関しては switch 文がループ構造とみなされます。 continue に引数を渡さなかった場合の動きは break と同じですが、間違いの元なので警告が生成されます。 switch がループ内にある場合、 continue 2 とすると、外側のループの次回の処理から続行します。 continueでは、オプションの引数で 処理をスキップするループ構造のレベルの数を指定できます。 デフォルト値は 1 で、 これは現在のループの終了地点までスキップします。 <?php $arr = ['zero', 'on

    PHP: continue - Manual
    Itisango
    Itisango 2023/08/10
    PHP では、continue の動作に関しては switch 文がループ構造とみなされます。 continue に引数を渡さなかった場合の動きは break と同じですが、間違いの元なので警告が生成されます
  • PHP: foreach - Manual

    Getting Started Introduction A simple tutorial Language Reference Basic syntax Types Variables Constants Expressions Operators Control Structures Functions Classes and Objects Namespaces Enumerations Errors Exceptions Fibers Generators Attributes References Explained Predefined Variables Predefined Exceptions Predefined Interfaces and Classes Predefined Attributes Context options and parameters Su

    PHP: foreach - Manual
    Itisango
    Itisango 2023/08/10
    二種類の構文があります。 foreach (iterable_expression as $value) 文 foreach (iterable_expression as $key => $value) 文 最初の形式は、iterable_expression で指定した反復可能な値に 関してループ処理を行います。
  • PHP: for - Manual

    for (PHP 4, PHP 5, PHP 7, PHP 8) for ループは、PHPで最も複雑なループです。 for は、Cのforループと同様に動作します。 forループの構文は、次のようになります。 最初の式(式1)は、ループ開始時に無条件に 評価(実行)されます。 各繰り返しの開始時に、式2が評価されます。 その式の値がtrueが場合、ループは継続され、括弧 内の文が実行されます。値がfalseの場合、ループの 実行は終了します。 各繰り返しの後、式3が評価(実行)されます。 各式は空にすることもできますし、複数の式をカンマで区切って指定することもできます。 式2 でカンマ区切りの式を使用すると、 すべての式を評価します。しかし、結果として取得するのは最後の式の結果となります。 式2 を空にすると、無限実行ループになります (PHP は、この状態を C 言語のように暗黙の内に

    PHP: for - Manual
    Itisango
    Itisango 2023/08/10
    PHPは、forループ用に"コロン構文"もサポートします。 for loops. for (式1; 式2; 式3): 文; ... endfor;
  • PHP: while - Manual

    Getting Started Introduction A simple tutorial Language Reference Basic syntax Types Variables Constants Expressions Operators Control Structures Functions Classes and Objects Namespaces Enumerations Errors Exceptions Fibers Generators Attributes References Explained Predefined Variables Predefined Exceptions Predefined Interfaces and Classes Predefined Attributes Context options and parameters Su

    PHP: while - Manual
    Itisango
    Itisango 2023/08/10
    if文と同様に、波括弧で複数の文を囲うか、 以下に示す別の構文を用いることにより、同じwhile ループの中に複数の文をグループ化することができます。 while (式): 文 ... endwhile;
  • PHP: 型演算子 - Manual

    Getting Started Introduction A simple tutorial Language Reference Basic syntax Types Variables Constants Expressions Operators Control Structures Functions Classes and Objects Namespaces Enumerations Errors Exceptions Fibers Generators Attributes References Explained Predefined Variables Predefined Exceptions Predefined Interfaces and Classes Predefined Attributes Context options and parameters Su

    PHP: 型演算子 - Manual