Ditching Reset and End in PHP: What's the Better Alternative?
If you have been writing PHP for a year or two, you have almost certainly written something like this: $items = getFilteredOrders(); $first = reset($items); $last = end($items); It works. It runs. It looks fine in code review. And it contains a subtle bug waiting to happen. reset() and end() Both fu










