Skip to content

Commit e223fdf

Browse files
Improve str_replace return type
1 parent bd10157 commit e223fdf

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

stubs/core.stub

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,7 @@ function preg_filter($pattern, $replacement, $subject, int $limit = -1, &$count
256256
* @param array<string>|string $replace
257257
* @param array<string>|string $subject
258258
* @param-out int $count
259-
* @return list<string>|string
259+
* @return ($subject is array ? list<string> : string)
260260
*/
261261
function str_replace($search, $replace, $subject, ?int &$count = null) {}
262262

@@ -265,7 +265,7 @@ function str_replace($search, $replace, $subject, ?int &$count = null) {}
265265
* @param array<string>|string $replace
266266
* @param array<string>|string $subject
267267
* @param-out int $count
268-
* @return list<string>|string
268+
* @return ($subject is array ? list<string> : string)
269269
*/
270270
function str_ireplace($search, $replace, $subject, ?int &$count = null) {}
271271

0 commit comments

Comments
 (0)