ID: 9979
User Update by: [EMAIL PROTECTED]
Status: Open
Old-Bug Type: Unknown/Other Function
Bug Type: Scripting Engine problem
Description: (! $a == $b) and ($a != $b) discreprency

Previous Comments:

[2001-03-25 13:40:25] [EMAIL PROTECTED]
I've noticed a difference in how (! $a == $b) and ($a != $b) behaves between in PHP 
4.04pl1.  I think those should be syntactically equivalent, but with PHP 4.04pl1 they 
are not, whereas with older versions they are.  Here is a script to test this:

$a = "foo";
$b = "bar";

echo "nTest 1: ";
echo (! $a == $b) ? "true" : "false";

echo "nTest 2: ";
echo ($a != $b) ? "true" : "false";

echo "n";

With PHP4.04pl1 the results are:

Test 1: false
Test 2: true

With PHP3.18 the results are:

Test 1: true
Test 2: true

It would seem that the results with PHP 4 are wrong here, please advise.  Information 
about my system follows:

OS: Redhat Linux
Kernel: 2.4.1
PHP Version: 4.04pl1
'./configure' '--disable-debug' '--with-config-file-path=/usr/local/etc' 
'--enable-bcmath' '--with-mysql' '--with-pgsql' '--with-gdbm' '--with-openssl' 
'--with-curl' '--with-readline' '--enable-inline-optimization'

PHP Version: 3.18
./configure '--disable-debug' '--enable-force-cgi-redirect' '--enable-track-vars' 
'--with-config-file-path=/etc/httpd/conf' '--enable-sysvsem' '--enable-sysvshm' 

I am using the standard php ini files (php.ini-dist and php3.ini-dist) with no changes 
in both tests.  Please advise.


Full Bug description available at:

PHP Development Mailing List <>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to