DEV Community 👩‍💻👨‍💻

Discussion on: Using isset() and empty() hurts your code

dhandspikerwade profile image
Devin Handspiker-Wade • Edited on

It's a simple benchmark with many examples, but to quote one of them provided on the PHP manual:

Benchmark (100000 runs):
array_key_exists() : 205 ms
is_set() : 35ms
isset() || array_key_exists() : 48ms
Enter fullscreen mode Exit fullscreen mode