PHP 8.4.24 Released!

Voting

: three minus two?
(Example: nine)

The Note You're Voting On

tm
4 years ago
If you are using a match expression for non-identity checks as described above make sure whatever you are using is actually returning `true` on success.

Quite often you rely on truthy vs. falsy when using if conditions and that will not work for match (for example `preg_match`). Casting to bool will solve this issue.

<< Back to user notes page

To Top