タグ

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

タグの絞り込みを解除

Psyshに関するchanpon0のブックマーク (2)

  • PHPのin_arrayは罠が多いので注意喚起が必要 - Qiita

    最初に結論 in_arrayには第三引数trueを指定しろ。絶対にだ。 はじめに in_arrayについては、はじめにPHP: in_array - Manualをよく読んでおいてほしい。 この記事に書いたコード断片は、どうか読むだけではなく自分で手を動かして確認してほしい。 PHPで短いコードを動かすのはPsySHを利用すると、とても捗る。ローカルに動作環境がなければ、Ideone.comなどのオンラインサービスを利用しても差支ない。 static $fruits = ["apple", "orange", "banana"]; in_array("apple", $fruits); // => true in_array("mikan", $fruits); // => false これがin_arrayのふつうの使ひかただ。 Webアプリケーションでの実例 では、次のような例を見てみ

    PHPのin_arrayは罠が多いので注意喚起が必要 - Qiita
  • PsySH

    Stop die()ing all the time PsySH can be used as an interactive debugger, much like JavaScript's debugger statement, saving you from endless var_dump() and die() iterations. Just drop this line in where you'd like to have a breakpoint: eval(\Psy\sh()); Auto[tab][tab]Complete PsySH has tab completion for variable names, functions, classes, methods, properties, and even files! Just start typing, then

  • 1