Skip to content
#

type-inference

Here are 128 public repositories matching this topic...

7ochem
7ochem commented Feb 14, 2022

The stub for preg_replace_callback() is:

https://github.com/vimeo/psalm/blob/36d5a2a83c1d7b3e2aca1cfe9e9dcc916619e962/stubs/CoreGenericFunctions.phpstub#L922-L932

With @param callable(string[]):string $callback. However if you pass the PREG_UNMATCHED_AS_NULL flag the signature will become @param callable((string|null)[]):string $callback.

I have a $m[1] === null check in my call

Improve this page

Add a description, image, and links to the type-inference topic page so that developers can more easily learn about it.

Curate this topic

Add this topic to your repo

To associate your repository with the type-inference topic, visit your repo's landing page and select "manage topics."

Learn more