• limer@lemmy.ml
    link
    fedilink
    arrow-up
    1
    ·
    8 months ago

    Yield is perhaps the oldest and least used keyword on the php ecosystem. I went through several large code bases trying to see how it’s used, and it really wasn’t that much.

    I think this is because it’s one of those keywords whose expected usage is covered by other solutions

    • librebyte@lemmy.mlOPM
      link
      fedilink
      arrow-up
      2
      ·
      8 months ago

      To be clear yield was introduced in PHP 7… and of course you can implement the same functionality using iterators but with more coding, today also we can use fiber for similar…