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
{{ message }}
Repository navigation
pipe operator (|>) fails to correctly handle returning by reference #19476
There appears to be a bug in how the new pipe operator (|>) handles functions that return by reference. An expression using the pipe operator is not behaving identically to its equivalent standard function call, specifically when a reference is expected to be returned.
The expression "foo" |> get_ref(...) should, in theory, be functionally equivalent to $c = get_ref(...); $c("foo");. However, the two produce different results when the function is declared to return a reference.
This code correctly returns a reference to the static variable within get_ref without any errors ( https://3v4l.org/Ojaah ):
Activity
Fix phpGH-19476: pipe operator fails to correctly handle returning by…
Fix phpGH-19476: pipe operator fails to correctly handle returning by…