Upgrade to Pro — share decks privately, control downloads, hide ads and more …

ここが変だよPHP(褒め言葉) 入門編 / The good thing about PHP : An introduction

宮城築
February 12, 2024
370

ここが変だよPHP(褒め言葉) 入門編 / The good thing about PHP : An introduction

宮城築

February 12, 2024
Tweet

Transcript

  1. 特徴 ・2023 年 6 月 BABY JOB に入社 ・沖縄 からフルリモートで参画

    ・保活サービス を開発中 ・BUMP OF CHICKEN が好き ・PM と保育園のお弁当に挑戦中 自己紹介 宮城 築 ミヤギ@3歳児の父エンジニア|BABYJOB @KizuMiyagi old now
  2. すべての人が子育てを楽しいと思える社会 乳児期 幼児期 学童期 妊娠・出産 産後うつ 保活が大変 いやいや期 学童不足 小一の壁

    子育てには課題がたくさん・・・ 育児と子育て の両立が大変 保活(保育園探し)をサポート 保育園の準備をサポート
  3. public function __construct( private readonly hogeInterface $hoge, private readonly fugaInterface

    $fuga, ) { parent::__construct(); } コピペした時のカンマを 消し忘れてる! あるあるだよね!
  4. public function __construct( private readonly hogeInterface $hoge, private readonly fugaInterface

    $fuga, ) { parent::__construct(); } コピペした時のカンマを 消し忘れてる! あるあるだよね! 末尾カンマ でした😇
  5. public function __construct( private readonly hogeInterface $hoge, // ← 末尾カンマがないと

    private readonly fugaInterface $fuga // 2 行を修正する ) { parent::__construct(); }
  6. // 論理積 echo (false and true) ? 'No, It’s not

    me..' : 'It’s me !!'; // 論理和 echo (false or true) ? 'It’s me !!' : 'No, It’s not me..'; // 排他的論理和 echo (false xor true) ? 'It’s me !!' : 'No, It’s not me..';
  7. 何が違うの? 優先順位が異なる( and と or の優先順位は && と || よりも低い)

    何がいいの? 視覚的にわかりやすい 対応している言語 Perl、Python、Ruby・・・ 論理演算子 参考:https://www.php.net/manual/ja/language.operators.logical.php