Bug #78886 [Opn->Nab]: Non-strict comparison '@foo' == 0 resolves to true

From: Date: Fri, 29 Nov 2019 13:02:57 +0000
Subject: Bug #78886 [Opn->Nab]: Non-strict comparison '@foo' == 0 resolves to true
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-223944@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=78886&edit=1 ID: 78886 Updated by: peehaa@php.net Reported by: frederik at sauerpower dot dk Summary: Non-strict comparison '@foo' == 0 resolves to true -Status: Open +Status: Not a bug Type: Bug Package: Strings related Operating System: macOS Mojave 10.14.6 PHP Version: 7.3.12 Block user comment: N Private report: N New Comment: Thank you for taking the time to write to us, but this is not a bug. Please double-check the documentation available at http://www.php.net/manual/ and the instructions on how to report a bug at http://bugs.php.net/how-to-report.php https://www.php.net/manual/en/types.comparisons.php Previous Comments: ------------------------------------------------------------------------ [2019-11-29 12:58:52] frederik at sauerpower dot dk Description: ------------ Any string starting with @, like '@foo', compared to 0 (zero) resolves to true. Test script: --------------- var_dump('@foo' == 0); var_dump('@foo' === 0); Expected result: ---------------- false false Actual result: -------------- true false ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=78886&edit=1

« previous php.bugs (#223944) next »