Home  >  Q&A  >  body text

Isn't the queue first in first out?

Why is it last in first out on the teacher's side?

大写字母H大写字母H2714 days ago2467

reply all(5)I'll reply

  • 太山遍雨河润千里

    太山遍雨河润千里2018-02-22 20:03:52

    It seems to be a two-way queue

    reply
    0
  • 天蓬老师

    天蓬老师2017-06-07 09:21:16

    The queue is first in, first out. You are right, but that is an operation performed at the head and tail of the array at the same time.

    PHP uses a stack method to simulate team operations, which are all performed at one end. Some methods are shared, so don’t be too entangled, as long as the same function is completed. Of course, you can also change it to the second end, depending on the needs of the project.

    However, from the question you asked, it can be seen that you are studying seriously. Thank you very much for asking this question.


    reply
    1
  • phpcn_u46495

    Teacher Zhu, the video of this course is very good. I hope php.cn can provide some courses on practical projects and redis high concurrency.

    phpcn_u46495 · 2017-11-02 12:26:56
  • ringa_lee

    ringa_lee2017-06-07 09:09:16

    The queue operates asynchronously and is based on logic

    reply
    0
  • Cancelreply