You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is in fact expected behavior, because you would otherwise bind the initial variable value to your closure, but you actually want the value that changes over time (due to your data callback).
I hope this helps 👍
I believe this has been answered, so I'll close this for now. Please feel free to come back with more details if this problem persists and we can reopen this 👍
This is in fact expected behavior, because you would otherwise bind the initial variable value to your closure, but you actually want the value that changes over time (due to your data callback).
I was always under the impression that binding by ref is only required for writing back. But your explanation makes much more sense, big thanks for taking the time!
I've got the following simple code which sends a request and displays the response.
Problem: the echoed buffer will always be
string(0)
unless I declare it as&buffer
in theon('end')
.string(0)
is how the buffer is initialized:Might this be a problem with PHP-internal optimization?
The text was updated successfully, but these errors were encountered: