I think the following WordPress functions should be listed as impure (e.g. add comment @phpstan-impure in function header) because calling them with the same values at different times can yield different results:
- wp_mail - success and failure of the call, even if parameters are the same, depends on the state of the system, so can vary with time
- get_transient - other calls can alter the value of the transient between get_transient calls for the same transient
I think the following WordPress functions should be listed as impure (e.g. add comment @phpstan-impure in function header) because calling them with the same values at different times can yield different results: