Hello,

I understand that the idea of ​​the RFC is about some behaviors of empty(), e.g.:

```php $var = ''; var_dump(empty($var)); // true $var= []; var_dump(empty($var)); // true $var= 0; var_dump(empty($var)); // true var_dump(empty($empty)); // true $var= true; var_dump(empty($var)); // false, $varis defined and has value $str = false; var_dump(empty($var)); // true, $varis defined and has value ```

According to the manual: “determine whether a variable is empty”.

However, according to my example, the variable is defined and has its value as 0 or false, and empty() returns true anyway. I confess that I've had some problems like this, and we chose not to use empty(), as sometimes 0 or false makes sense as a valid value.

Also, having is_empty() would be nice, but keeping it empty, otherwise there would be a huge break.

Maybe think of a strict empty() mode? Even so, it would change behavior.

Sorry if I didn't understand the discussion correctly.

Reply via email to