For the past months I’ve been keeping a list of things I encountered in PHP that I’ve found to be problematic, or in other words things that annoy me. me having problems and being annoyed This is not my definitive list and things that annoy me in PHP largely depend on the things I’m working on, and for the past month I’ve been working on: Phpactor: PHP language serverPHP-TUI TUI framework and port
PHPを使う上で、約140の遭遇しがちな問題とその解決策をまとめたレシピ集です。PHPの基本的な文法から、暗号化、エラー処理、デバッグ、パフォーマンスチューニングといった重要な概念、型システム、非同期処理まで、効率的でモダンなWebアプリケーションを構築するためのレシピを網羅しています。パフォーマンスの改善、安全性の強化など、機能が大幅に向上したPHP 8を使いこなす上で、信頼できるリファレンスとして、常に手元に置いておきたい一冊です。 はじめに 1章 変数 レシピ1.1 定数の定義 レシピ1.2 可変変数の作成 レシピ1.3 変数の交換 2章 演算子 論理演算子 ビット演算子 比較演算子 型キャスト レシピ2.1 if/elseブロックの代わりに三項演算子を使用する レシピ2.2 null値を合体する レシピ2.3 値が等しいか評価する レシピ2.4 宇宙船演算子により値をソートする レ
こんにちは! バックエンドエンジニアの高町咲衣です! この記事では、PHPでDDD(ドメイン駆動設計)を扱う際に気になる「値オブジェクトを更新=作り直した時のメモリ周りの挙動」について調査した結果をまとめています。 値オブジェクトは不変である DDDの文脈における値オブジェクト(ValueObject)の特徴の一つとして、不変(immutable)であることが挙げられます。 値オブジェクトは「値を表現する」オブジェクトであり、例えばプリミティブな値であるint、stringなどと同じように取り扱うべきだとされています。 // プリミティブな値を用いた、ごく一般的な感覚のコード例 $number = 1; // 値をセットする $number = 2; // 値を入れ直す var_dump($number); // 2 var_dump($number === 1); // false //
Kevin Tatroe、Peter MacIntyre 著、永井 勝則 監訳、中野 圭 訳 2023年4月24日発売予定 456ページ(予定) ISBN978-4-8144-0027-0 定価4,290円(税込) 本書はPHPプログラマのバイブルとして多くのエンジニアに親しまれている定番解説書の改訂第4版です。強力な文字列処理や配列処理、オブジェクト指向プログラミングのサポート、さまざまな拡張モジュー ルと組み合わせてのMySQLやOracleといったデータベースの使用、グラフの描画、 PDFファイルの作成、XMLファイルの解析、JSONなど、PHP言語の基本からプログラミングに関する実用的なヒントまで解説します。PHPに付属する多くの拡張モジュールの使用法を身につけ、PHPのウェブアプリケーションを設計して作成できるようになるでしょう。本格的なウェブ開発を行いたい方やPHPをしっかり学
近況報告 エンジニア転職成功しました。YouTubeもはじめました。 こんにちは。業務でPHPを扱いCRMをメインに開発しているYUUKIです。 PHPで書かれたコードを見ていると、文字列を囲む際に ダブルクォーテーション("") シングルクォーテーション('') の2つを使っているパターンがありますね。 この2つの違いを明確に理解するために、 PHPにおけるダブルクォーテーションとシングルクォーテーションの違いを解説します。 文字列出力では同じ内容が出力されるが、動作速度が違う 例えば「この野菜はトマトです」という文字列を出力する場合 <?php // ダブルクォーテーション echo "この野菜はトマトです"; echo '<br>'; // シングルクォーテーション echo 'この野菜はトマトです'; 出力結果 出力される内容は同じですが、出来ることに差があります。 例えば、ダブル
2023年2月18日紙版発売 2023年2月18日電子版発売 めもりー 著,小山哲志 監修 B5変形判/272ページ 定価3,740円(本体3,400円+税10%) ISBN 978-4-297-13358-0 Gihyo Direct Amazon 楽天ブックス 丸善ジュンク堂書店 ヨドバシ.com 電子版 Gihyo Digital Publishing Amazon Kindle ブックライブ 楽天kobo honto 本書のサポートページサンプルファイルのダウンロードや正誤表など この本の概要 近年,Web開発においてネットワーク経由での入出力を必要とするケースが増え,非同期処理を利用したWebアプリケーションの実装がごく一般的になりつつあります。その一方で,Webサービス開発に使われることの多いPHPは,その言語仕様ゆえに,非同期処理の実装を苦手としてきました。そのため,苦手意識
PHPUnit 10 February 3, 2023 The PHPUnit development team is pleased to announce the immediate availability of PHPUnit 10. This release adds new features, modifies and removes existing functionality, and fixes bugs. PHPUnit 10 was scheduled to be released on February 5, 2021. Due to various reasons, including a pandemic, this was simply not possible. This does not mean that nothing has been achieve
ゲーム説明 このゲームは,PHP の関数名の補完をどれくらいできるかを競うゲームです。IME をオフにしてお楽しみください。 例えば「array_□□□□□□」のように表示されたら「reduce」または「filter」を入力する必要があります。 入力して,正解の場合,自動で次の問題に進みます。不正解の場合は,全ての入力フィールドがクリアされて入力再開になります。 1 問あたりの解答時間に制限があります(Easy=16 秒固定, Hard=16 秒から減少, Crazy=8 秒から減少)。また入力する文字数に応じてアディショナルタイムが加わります。 文字を入力すると自動で次の入力欄に進みます。また,Backspace/Delete キーを入力すると,一つ前の入力欄が初期化され入力できるようになります。 進行できた数かつ難しいモードを選ぶことでスコアが加算されます。ツイッターでシェアして競いま
From its humble beginnings as a personal project in the mid-90s, PHP has grown to become one of the most popular languages for web development, powering everything from small blogs to large enterprise applications. It's a language that has seen an astonishing transformation over the course of almost three decades. Even within the last 10 years, PHP has transformed in ways we couldn't imagine. Ever
メリークリスマス! 週末もPHPを楽しんでますか? ところでWebセキュリティはWebアプリケーションを公開する上で基礎中の基礎ですよね! メジャーな脆弱性を作り込まないことはWeb開発においては専門技術ではなく、プロとしての基本です。 中でもXSS (Cross-Site Scriptingクロスサイトスクリプティング)やインジェクションについての考慮は常に絶対に欠いてはならないものです。 現実にはプログラミングには自動車のような運転免許制度がないため、自動車学校に通わず独学で公道に出ることができてしまいます。つまりは基礎知識がないままにWebプログラマとして就職したり、フリーランスとして案件を請けることも現実には罷り通っています。それは一時停止標識も赤信号も知らずにタクシー営業しているようなものです。 このような事情により、体系的な理解のないWeb開発初心者は (時にはn年のキャリアを
PHPのstringは任意のバイト列を扱えますが、JavaScript/JSONはUnicodeで扱える文字しか扱えません PHPのint / floatはプラットフォーム依存ですが、JavaScriptのnumberは整数と小数を型レベルで区別しません JSONのarrayに対応する型はPHPのarrayのうちリストであるものです PHPは配列(リスト)と連想配列を型レベルで区別せず、どちらもarrayです リストはキーが0からの抜けがない連番になっている要素が0個以上の配列です array_is_list()関数で連想配列とリストを判別できます array_values()で連想配列をリストに変換できます array_filter()の結果はフィルタされたキーがスキップされるのでリストではありませんが、結果をarray_values()に通すことでリストにできます JsonSerial
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く