File tree Expand file tree Collapse file tree 3 files changed +30
-1
lines changed Expand file tree Collapse file tree 3 files changed +30
-1
lines changed Original file line number Diff line number Diff line change 55- Core:
66 . Fixed bug GH-18850 (Repeated inclusion of file with __halt_compiler()
77 triggers "Constant already defined" warning). (ilutov)
8+ . Fixed bug GH-19476 (pipe operator fails to correctly handle returning
9+ by reference). (alexandre-daubois)
810
911- ODBC:
1012 . Remove ODBCVER and assume ODBC 3.5. (Calvin Buckley)
Original file line number Diff line number Diff line change 1+ --TEST--
2+ Fix GH-19476: Pipe operator with function returning by reference
3+ --FILE--
4+ <?php
5+
6+ function &get_ref ($ _ ): string {
7+ static $ a = "original " ;
8+
9+ $ a .= " " .$ _ ;
10+
11+ return $ a ;
12+ }
13+
14+ function &test_pipe_ref (): string {
15+ return "input " |> get_ref (...);
16+ }
17+
18+ $ ref = &test_pipe_ref ();
19+ echo "Before: " . $ ref . "\n" ;
20+ $ ref = "changed " ;
21+ echo "After: " . test_pipe_ref () . "\n" ;
22+
23+ ?>
24+ --EXPECT--
25+ Before: original input
26+ After: changed input
Original file line number Diff line number Diff line change @@ -2726,7 +2726,8 @@ static inline bool zend_is_call(zend_ast *ast) /* {{{ */
27262726 return ast -> kind == ZEND_AST_CALL
27272727 || ast -> kind == ZEND_AST_METHOD_CALL
27282728 || ast -> kind == ZEND_AST_NULLSAFE_METHOD_CALL
2729- || ast -> kind == ZEND_AST_STATIC_CALL ;
2729+ || ast -> kind == ZEND_AST_STATIC_CALL
2730+ || ast -> kind == ZEND_AST_PIPE ;
27302731}
27312732/* }}} */
27322733
You can’t perform that action at this time.
0 commit comments