並び順

ブックマーク数

期間指定

  • から
  • まで

1 - 13 件 / 13件

新着順 人気順

"PHP 8.2"の検索結果1 - 13 件 / 13件

タグ検索の該当結果が少ないため、タイトル検索結果を表示しています。

"PHP 8.2"に関するエントリは13件あります。 phptechfeedarticle などが関連タグです。 人気エントリには 『【PHP8.2】PHP8.2の新機能 - Qiita』などがあります。
  • 【PHP8.2】PHP8.2の新機能 - Qiita

    PHP8.3 / PHP8.2 / PHP8.1 / PHP8.0 2022/07/19、PHP8.2がフィーチャーフリーズしました。 言語機能に関わるような機能の追加・変更が締め切られたということです。 今後はデバッグを繰り返しながら完成度を高めていき、2022/11/24にPHP8.2.0がリリースされる予定です。 というわけでPHP8.2で実装されるRFCを見てみましょう。 RFC Disjunctive Normal Form Types 賛成25、反対1で受理。 選言標準形です。 UNION型と交差型を同時に使えるようになります。 思う存分型パズルで遊べますね。 // A型、もしくはB型かつC型、もしくはint function hoge( A | (B & C) | int $param){}

      【PHP8.2】PHP8.2の新機能 - Qiita
    • 【PHP8.2】動的プロパティが禁止される - Qiita

      $dt = new DateTime(); $dt->hoge = 1; var_dump($dt->hoge); // 1 PHPでは未定義のプロパティに値を突っ込むと、特に何の抵抗もなくプロパティが生えます。 しかし、他の多くの言語ではこのような動作にならず、未定義プロパティを突っ込もうとするとエラーになります。 ということでこれを禁止しようというRFCが提出されました。 以下はDeprecate dynamic propertiesのRFCの紹介です。 PHP RFC: Deprecate dynamic properties Introduction 宣言されていないプロパティに書き込みを行うと、PHPでは何もエラーが出ずに動的にプロパティが作成されます。 現代のコードにおいて、これが意図的に行われることはほとんどありません。 このRFCでは、動的プロパティを非推奨とし、将来的に削

        【PHP8.2】動的プロパティが禁止される - Qiita
      • PHP: PHP 8.2.0 Release Announcement

        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: PHP 8.2.0 Release Announcement
        • 【PHP8.2】PHP8.2がリリースされたので新機能全部やる - Qiita

          PHP8.3 / PHP8.2 / PHP8.1 / PHP8.0 2022/12/08にPHP8.2.0がリリースされました。 大きな新機能については、PHP8.0以降公開されるようになったランディングページで見ることができます。 ここでは、概要だけではなくUPGRADINGに載っている変更点を全部見て回ることにします。 Backward Incompatible Changes 下位互換性のない変更点。 Date DateTime::createFromImmutable() now has a tentative return type of static DateTime::createFromImmutable()の返り値の型がstatic型になりました。 以前はDateTime型でした。 これはphpstanのバグへの対応です。 class CustomDateTimeImmu

            【PHP8.2】PHP8.2がリリースされたので新機能全部やる - Qiita
          • 「PHP8.2でジェネリクスが導入」AI生成の嘘記事ばかりで公式ドキュメント以外信じられない時代に

            Cubbit @cubbit2 へーPHPも進化してきたねーと褒めようと記事を開いたらこのザマですわ…… 被告人は市中引き回しのうえ打首獄門とする 【PHP8.2】PHP8.2でジェネリクスが導入された qiita.com/rana_kualu/ite… #Qiita 2024-02-29 02:20:32 リンク Qiita 【PHP8.2】PHP8.2でジェネリクスが導入された - Qiita PHP 8.2 新機能の概要とコード例4. ジェネリクスPHP 8.2 では、ジェネリクスのサポートが導入されました。ジェネリクスを使用すると、コードの再利用性が向上し、型安全性も確保されます。… 16 users 11

              「PHP8.2でジェネリクスが導入」AI生成の嘘記事ばかりで公式ドキュメント以外信じられない時代に
            • 【PHP8.2】PHP8.2でジェネリクスが導入された - Qiita

              4. ジェネリクス PHP 8.2 では、ジェネリクスのサポートが導入されました。 ジェネリクスを使用すると、コードの再利用性が向上し、型安全性も確保されます。 interface Collection<T> { public function add(T $item): void; public function get(int $index): T; } class StringCollection implements Collection<string> { // ... } $stringCollection = new StringCollection(); $stringCollection->add("Hello"); $stringCollection->add(123); // エラー:string 型が期待されています この注釈、詳細ページには一切記述されていないため

                【PHP8.2】PHP8.2でジェネリクスが導入された - Qiita
              • 「PHP 8.2」がリリース ~Readonlyクラスや新しい乱数ジェネレーターを導入/動的なプロパティの追加は非推奨化。「PHP 9.0」で廃止予定

                  「PHP 8.2」がリリース ~Readonlyクラスや新しい乱数ジェネレーターを導入/動的なプロパティの追加は非推奨化。「PHP 9.0」で廃止予定
                • 【PHP8.2】PHPの乱数がすごい改善される - Qiita

                  class XorShift128Plus { /* constants */ protected const MASK_S5 = 0x07ffffffffffffff; protected const MASK_S18 = 0x00003fffffffffff; protected const MASK_S27 = 0x0000001fffffffff; protected const MASK_S30 = 0x00000003ffffffff; protected const MASK_S31 = 0x00000001ffffffff; protected const MASK_LO = 0x00000000ffffffff; protected const ADD_HI = 0x9e3779b9; protected const ADD_LO = 0x7f4a7c15; protec

                    【PHP8.2】PHPの乱数がすごい改善される - Qiita
                  • 【PHP8.2】PHPで選言標準形 (Disjunctive Normal Form) 型が使えるようになる - Qiita

                    タイトルの意味はよくわからない。 さてPHPでは、PHP8.0で型のOR、PHP8.1で型のANDが使えるようになりました。 しかし、この両者を組み合わせて使うことはできません。 function f(A | B | C $param){} // OK function f(A & B & C $param){} // OK function f(A | B & C $param){} // NG ← ということで、これを可能にしようというRFCが提出されました。 既に投票は終わっており、賛成多数で可決されました。 PHP8.2からDNF型が使用可能になります。 以下は該当のRFC、Disjunctive Normal Form Typesの日本語訳です。 PHP RFC: Disjunctive Normal Form Types Introduction Disjunctive Nor

                      【PHP8.2】PHPで選言標準形 (Disjunctive Normal Form) 型が使えるようになる - Qiita
                    • php:8.2-fpmのdocker imageでapt-getしたらエラーが出まくった - Qiita

                      Reading package lists... W: GPG error: http://deb.debian.org/debian bookworm InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 648ACFD622F3D138 NO_PUBKEY 0E98404D386FA1D9 NO_PUBKEY F8D2585B8783D481 E: The repository 'http://deb.debian.org/debian bookworm InRelease' is not signed. W: GPG error: http://deb.debian.org/debian bookworm-updates I

                        php:8.2-fpmのdocker imageでapt-getしたらエラーが出まくった - Qiita
                      • PHPerのための「PHP8.2の新機能」を語り合う【PHP TechCafe イベントレポート】 - RAKUS Developers Blog | ラクス エンジニアブログ

                        弊社で毎月開催し、PHPエンジニアの間で好評いただいているPHP TechCafe。 2022年8月のイベントでは「PHP8.2の新機能」について語り合いました。 弊社のメンバーが事前にまとめてきたPHP8.2の新機能に関する情報にしたがって、他の参加者に意見を頂いて語り合いながら学びました。 今回はその内容についてレポートします。 PHP8.2 新機能について Deprecate dynamic properties 「AllowDynamicProperties」アトリビュートによる救済措置 Readonly classes Constants in Traits 従来のトレイトの問題点 Deprecate ${} string interpolation ${}表記が非推奨になる理由 パターン1: 配列 パターン2: オブジェクトのプロパティ パターン3: メソッドコール Depre

                          PHPerのための「PHP8.2の新機能」を語り合う【PHP TechCafe イベントレポート】 - RAKUS Developers Blog | ラクス エンジニアブログ
                        • GitHub - nette/php-generator: 🐘 Generates neat PHP code for you. Supports new PHP 8.2 features.

                          You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session.

                            GitHub - nette/php-generator: 🐘 Generates neat PHP code for you. Supports new PHP 8.2 features.
                          • PHP 8.2: Dynamic Properties are deprecated

                            In PHP classes, it is possible to dynamically set and retrieve class properties that are not declared. These properties do not adhere to a specific (similar to typed properties), and it requires the use of __get() and __set() magic methods to effectively prevent or control how dynamic properties are set and retrieved. class User { private int $uid; } $user = new User(); $user->name = 'Foo'; In the

                            1

                            新着記事