[php-src] Issue #11221: zero is star
| From: | Olvikolvi | Date: | Wed, 10 May 2023 14:36:08 +0000 |
| Subject: | [php-src] Issue #11221: zero is star | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-244421@lists.php.net to get a copy of this message | ||
Issue: https://github.com/php/php-src/issues/11221
Author: Olvikolvi
### Description
The following code:
$t = intval(0);
if($t != '*')
echo 'not a star'."\n";
else
echo 'is star'."\n";
if($t !== '*')
echo 'not a star'."\n";
else
echo 'is star'."\n";
if($t == '*')
echo 'is star'."\n";
else
echo 'not a star'."\n";
Resulted in this output:
is star
not a star
is star
But I expected this output instead:
not a star
not a star
not a star
### PHP Version
PHP 7.4.3
### Operating System
Ubuntu 20.04