News for hackers. Stuff that matters.
Re:What PHP 5.5 might look like by Spoom on Thursday July 12, 2012 @09:20AM (#4234330)
I'm curious: Why do you think empty() should be deprecated? Do you think the same of isset?
Re:What PHP 5.5 might look like by debacle on Thursday July 12, 2012 @09:23AM (#4234350)
Re:What PHP 5.5 might look like by ChiperSoft on Thursday July 12, 2012 @12:32PM (#4235357)
I could see it being depreciated for use on non-arrays, but at the moment the only other method of detecting an empty array is `!count($arr)`, which is significantly slower if the array isn't empty.

Ultimately this isn't a language issue, it's a training issue. If you're using empty in place of isset, you're doing it wrong, the both serve completely different purposes.

Re:What PHP 5.5 might look like by wvenable on Thursday July 12, 2012 @10:51AM (#4234762)
Empty is identical to the not operator (!) except it also works on undefined variables, properties, and keys.
Re:What PHP 5.5 might look like by smsm42 on Friday July 13, 2012 @12:59AM (#4238290)
What you mean "unreliable"? It is completely reliable and described in the documentation. It doesn't fit some use cases, in these cases you could use other facilities provided by the language, PHP can not have separate language construct for every use case.