タグ

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

  • 関連タグはありません

タグの絞り込みを解除

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

  • 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
  • PHP: 配列演算子 - Manual

    <?php $a = array("a" => "apple", "b" => "banana"); $b = array("a" => "pear", "b" => "strawberry", "c" => "cherry"); $c = $a + $b; // Union of $a and $b echo "Union of \$a and \$b: \n"; var_dump($c); $c = $b + $a; // Union of $b and $a echo "Union of \$b and \$a: \n"; var_dump($c); $a += $b; // Union of $a += $b is $a and $b echo "Union of \$a += \$b: \n"; var_dump($a); ?> Union of $a and $b: array

    PHP: 配列演算子 - Manual
    Itisango
    Itisango 2023/08/10
    配列等価不等価比較ができる。
  • Laravel - The PHP Framework For Web Artisans

    Livewire New Laravel, Livewire, and Tailwind Packages

    Laravel - The PHP Framework For Web Artisans
  • PHP: 型の相互変換 - Manual

    型の相互変換 PHP は変数宣言時に明示的な型定義を必要としません。 型を定義しない場合、変数の型は保存する値によって決まります。 これは、変数 $var に文字列を代入した場合、 $var の型は文字列 (string) になることを意味しています。 その後、整数値を $var に代入すると、 その変数の型は整数 (int) になります。 コンテクスト(文脈)によっては、 PHP が値を別の型に自動変換しようとすることがあります。 自動変換が行われる異なるコンテクストが存在するのは、以下のとおりです: 数値のコンテクスト 文字列のコンテクスト 論理コンテクスト 整数と文字列のコンテクスト 比較のコンテクスト 関数のコンテクスト 注意: 値を別の型として解釈する必要がある場合でも、 値そのものの型は 変わりません。 変数を強制的にある特定の型として評価させたい場合は、 型キャスト のセクシ

    PHP: 型の相互変換 - Manual
  • PHP: 型宣言 - Manual

    型宣言 関数のパラメータや戻り値、 クラスのプロパティ (PHP 7.4.0 以降) に対して型を宣言することができます。 これによって、その値が特定の型であることを保証できます。 その型でない場合は、TypeError がスローされます。 PHP がサポートしている単一の型それぞれを、 ユーザーが行う型宣言の中で使うことができます。 但し、resource 型を除きます。 このページでは、それぞれの型がいつ利用可能になったかの変更履歴や、 型宣言におけるそれらの使い方について記しています。 注意: クラスがインターフェイスのメソッドを実装したり、 親クラスで既に定義されているメソッドを再実装する場合、 そのメソッドは、既に存在するメソッドと互換性がなければなりません。 共変性と反変性 のルールに従っている場合、メソッドには互換性があります。

  • PHP: Iterable - 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: Iterable - Manual
  • PHP: Never - 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: Never - 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/09
    staticの定義が独自かな?
  • 型理論 - Wikipedia

    型理論(かたりろん、英: Type theory)とは、プログラミング・数学言語学等に現れる型の概念及びそれらが成す型システムを研究対象とする数学・計算機科学の分野である。特定の型システムのことを型理論と呼ぶこともある。集合論の代替となる数学の基礎として役立てられる型理論(型システム)も存在する。そのような例としてアロンゾ・チャーチの型付きラムダ計算やマルティン・レーフの直観主義型理論が有名である。 20世紀初頭にバートランド・ラッセルが発見した、ラッセルのパラドックスによるフレーゲの素朴集合論の欠陥を説明する中で提起されたタイプ理論(theories of type)が型理論の起源であり[1]、後年にAxiom of reducibilityが付随された型理論は、ホワイトヘッドとラッセルの 『プリンキピア・マテマティカ』に収録されている[2]。 ここでは、Mendelson (1997

  • ボトム型 - Wikipedia

    ボトム型(ボトムがた、英: Bottom type)とは、型理論や数理論理学において値を持たない型のことである。ゼロ型または空型とも呼ばれ、アップタック記号(⊥)で表記される。戻り値の型がボトム型である関数は、いかなる値も返さない。カリー=ハワード同型対応ではボトム型は偽に対応する。 部分型付けシステムにおいて、ボトム型はすべての型の部分型である[1] 。(ただしその逆は成り立たない。つまり、すべて型の部分型が必ずしもボトム型であるとはいえない。)値を返さない関数(例えば無限ループや例外の送出、プログラムの終了など)の戻り値の型を表すのに使われる。 ボトム型は正常な返却ではないことを示すために使用されるので、普通は一切の値を持たない。これとは対照的にトップ型はシステム上可能なすべての値におよび、また、ユニット型はただ1つの値を持つ。ボトム型はいわゆるVoid型と混同されることがあるが、Vo

  • PHP: 配列 - Manual

    配列 PHP の配列は、実際には順番付けられたマップです。マップは型の一種で、 値をキーに関連付けます。 この型は、さまざまな使い道にあわせて最適化されます。 配列としてだけでなく、リスト (ベクター)、 ハッシュテーブル (マップの実装の一つ)、辞書、コレクション、スタック、 キュー等として使用することが可能です。 PHP の配列には他の PHP 配列を値として保持することができるため、 非常に簡単にツリー構造を表現することが可能です。 これらのデータ構造に関する説明はマニュアルの範囲を超えるので省略しますが、 各々について、少なくとも一つは例を示します。 この分野は広範囲にまたがり、さまざまな文献が存在します。 より詳細な情報については、それらの文献を参照ください。 array() で指定 配列(array)は、言語に組み込まれた array() で作成することが可能です。この構造は

    PHP: 配列 - Manual
  • Doctrine: PHP Open Source Project

    Available as part of the Tidelift Subscription . Tidelift is working with the maintainers of Doctrine ORM and thousands of other open source projects to deliver commercial support and maintenance for the open source dependencies you use to build your applications. Save time, reduce risk, and improve code health, while paying the maintainers of the exact dependencies you use. Enterprise-ready open

    Doctrine: PHP Open Source Project