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

PHPのimmutable arrayとは

hnw
January 25, 2023

PHPのimmutable arrayとは

Quite Night 〜PHP〜 (2023/01/25) 発表資料

hnw

January 25, 2023
Tweet

More Decks by hnw

Other Decks in Technology

Transcript

  1. 1)1ͷ஌ΒΕ͟Δੑೳվળ ❖ ϨίʔυɺΧϥϜͷ࣍ݩ഑ྻΛฦ͢ྫ <?php function foo() { return [ "x1"=>["foo"=>1,"bar"=>2/*

    (ུ) */,"thud"=>13], "x2"=>["foo"=>1,"bar"=>2/* (ུ) */,"thud"=>13], /* ໿30000ߦলུ */ "x30000"=>["foo"=>1,"bar"=>2/* (ུ) */,"thud"=>13], ]; } foo();
  2. ·ͱΊ ❖ ࠷ۙͷ1)1ͩͱJNNVUBCMFBSSBZ͸ߴ଎ɾলϝϞϦ ❖ શΩʔɾશཁૉ͕Ϧςϥϧͷ഑ྻʹಛԽͨ͠࠷దԽ ❖ ഑ྻͷ࣮ମ͕01DBDIFͷΩϟογϡର৅ ❖ શ1)1ϓϩηεͰಉ࣮͡ମΛڞ༗ ❖

    1)1ͷ಺෦࣮૷ʹڵຯΛ࣋ͬͯ΋Β͑ͨΒخ͍͠Ͱ͢ ❖ 4MBDLάϧʔϓQIQVTFSTKBͰօ͞ΜϚχΞοΫͳ࿩Λ ͯͨ͠Γ͠·͢ɺ͓קΊͰ͢ʢṖͷએ఻ʣ