Pro Yearly is on sale from $80 to $50! »

PHP Data Structures

PHP Data Structures

Connehito Marché vol.5 〜PHP市〜 の LT 資料です
https://connehito.connpass.com/event/122217/

3a622e726b35fe71480166a16edcb66e?s=128

Takuya Arita

March 20, 2019
Tweet

Transcript

  1. Data Structures @ariarijp (Takuya Arita / ༗ా ୓࠸)

  2. Data Structures?

  3. Data Structures ʹ͍ͭͯ • PHP ϚχϡΞϧ • http://php.net/manual/ja/book.ds.php • GItHub

    • https://github.com/php-ds/ext-ds • ։ൃऀʹΑΔղઆ • https://medium.com/@rtheunissen/efficient-data-structures- for-php-7-9dda7af674cd
  4. ։ൃऀʹΑΔղઆهࣄͷൈਮ PHP has one data structure to rule them all.

    The array is a complex, flexible, master-of-none, hybrid data structure, combining the behaviour of a list and a linked map. But we use it for everything, because PHP is pragmatic: “dealing with things sensibly and realistically in a way that is based on practical rather than theoretical considerations”. An array gets the job done. Unfortunately, with flexibility comes complexity.
  5. ಛ௃ • Α͋͘Δσʔλߏ଄Λఏڙ • ༻్ʹ͋Θͤͯద੾ʹσʔλߏ଄Λબ୒Ͱ͖ Ε͹ɺύϑΥʔϚϯε޲্Λૂ͑Δ • Polyfill ΋ఏڙ͞Ε͍ͯΔ

  6. αϙʔτ͍ͯ͠Δσʔλߏ଄ • Vector • Deque • Map • Set •

    Stack • Queue • PriorityQueue • Pair
  7. ·ͱΊ • ແཧʹ࢖͏͜ͱ΋ແ͍Ͱ͕͢ɺ஌͓ͬͯ͘ͱ ॿ͔Δ͜ͱ͕͋Δ͔΋͠Ε·ͤΜ • ͔͠͠ɺ͜Εͬͯ PHP ʮΒ͍͠ʯͷ͔ʁ • ·ͩ·ͩ

    PHP ʹ΋஌Βͳ͍͜ͱ͕͍ͬͺ͍͋ Γ·͢Ͷʂ
  8. খωλͰ͕ͨ͠ ʮ஌ͬͯΔʯͷ͓ͦ͢Θ͚Ͱͨ͠