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
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...
3 Comments
limer@lemmy.ml · 1 pts · 182d
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.ml · 2 pts · 181d
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...
limer@lemmy.ml · 2 pts · 181d
I have not used fiber much but read the docs earlier and liked it