息の長いサービスの PHP8バージョンアップで見えた 課題と解決法 / Problems and solutions found when upgrading long-term services to PHP8
What's new in PHP 8.1 PHP 8.1 was released on November 25, 2021. It's currently the latest PHP version. In this post, we'll go through all features, performance improvements, changes and deprecations one by one. # New features As with every release, PHP 8.1 adds some nice new features. Keep in mind that this list will grow over the year. # Enums RFC Enums will be added in PHP 8.1! If you're unsure
2020/12/12 PHPカンファレンス2020の登壇資料です
PHP8.1 / PHP8.0 / PHP7.4 2020/11/26にPHP8.0.0がリリースされました。 ということで、UPGRADINGに載っている機能や変更点をだいたい全部見て回ることにします。 Backward Incompatible Changes 後方互換性のない変更。 なお、ここで削除される機能の多くは何年も前から公知されています。 PHPコア match is now a reserved keyword. matchが予約語になりました。 match構文の導入に伴う措置です。 function match(){} // PHP8.0 Parse error: syntax error, unexpected token "match", expecting "(" // PHP7.4 エラーは起こらない
PHP 8: Attributes As of PHP 8, we'll be able to use attributes. The goal of these attributes, also known as annotations in many other languages, is to add meta data to classes, methods, variables and what not; in a structured way. The concept of attributes isn't new at all, we've been using docblocks to simulate their behaviour for years now. With the addition of attributes though, we now have a f
PHP 8 の新機能の一つ、Attribute の形式が紆余曲折ありながら最終的に #[] となりました。実用上は #[] 形式だけ覚えておけば良いのですが、シンタックスの変遷は興味深いものだったので残しておこうと思います。 Attribute Attribute 仕様の変遷 8.0.0alpha1: <<>> 8.0.0alpha2 8.0.0beta1: @@ @@ の問題 8.0.0beta4: #[] #[] の注意点 さいごに Attribute PHP 8 の Attribute は、他のプログラミング言語によくあるアノテーションです。クラスやメソッド、プロパティ、関数に付与することで任意の処理を追加することができます。PHP では従来 Doc コメントでこれを指定する文化がありましたが、これを言語仕様として実装したものです。 <?php declare(strict_type
結果は順にtrue、true、falseです。 これがPHP7までの非厳密な比較(等価)演算子だったわけですが、まあおかしいよねってことで、この挙動がPHP8.0で変更になることになりました。 よもや今さら基本中の基本である比較演算子の動作を弄ってくるとは思わなかったぞ。 以下はSaner string to number comparisonsの日本語訳です。 PHP RFC: Saner string to number comparisons Introduction ==やその他の非厳密な比較演算子を用いた文字列と数値の比較は、現在は、文字列を数値にキャストし、その後整数か浮動小数の比較を行っています。 この結果、多数の不可解な結果が得られますが、中でも注目すべきは0 == "foobar"がtrueになることです。 このRFCでは、文字列が実際に数値型文字列である場合にのみ数値型
PHP 8.0 is expected to be released by the end of the year, so it’s time to take a first look at the next major version of PHP. Attributes, union types, and a just-in-time compiler are likely the flagship features of this release, but there are many more improvements to be excited about. As PHP 8.0 is a major version, this release also includes backwards-incompatible changes, many of which are cent
What's new in PHP 8 PHP 8 was released on November 26, 2020. You can download it here. It's a new major version, which means that there are some breaking changes, as well as lots of new features and performance improvements. Because of the breaking changes, there's a higher chance you'll need to make some changes in your code to get it running on PHP 8. If you've kept up to date with the latest re
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く