is_null vs "$var === null

Why PhpStorm' inspection suggests using "$var === null" construction instead of simply using is_null() function?

1 comment

Hi there,

This inspection is provided by 3rd party Php Inspections (EA Extended) plugin and not by PhpStorm itself.

As to why -- it's a tiny bit faster/micro optimisation (as not function call is involved; need to measure few thousand if not hundred thousand times), not so much these days.

Check or linked questions.


Please sign in to leave a comment.