Why is === faster than == in PHP?

前端 未结 12 894
有刺的猬
有刺的猬 2020-12-12 10:39

Why is === faster than == in PHP?

12条回答
  •  攒了一身酷
    2020-12-12 11:33

    The == incurs a larger overhead of type conversion before comparison. === first checks the type, then proceeds without having to do any type conversion.

提交回复
热议问题