The timers
phase is the first phase of the NodeJS Event Loop cycle.
But the decision to add to this queue is made by the poll
phase.
After the poll
phase is completed, the check
phase is executed, in which the callbacks from setImmediate are executed.
For this reason, the callback from setTimeout with zero delay is executed in the next tick of the Event Loop cycle.