|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2003-12-04 07:10 UTC] derick@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Nov 19 08:00:01 2025 UTC |
Description: ------------ When doing the following script it has a VERY weird behavior As you might notice we did a =! instead of !=. It was an error, but we didn't notice. Then we got the problem that it converted the content of the var to 1. So the value was now missing. It took us quite some time to debug on this one. Below is the script to reproduce the error. When running it, it might seems clearer what i mean Reproduce code: --------------- <?php $aTest = array( 'name' => 'And', 'email' => 'test@test.com' ); echo "<pre>"; print_r($aTest); if($aTest['name'] =! "") { print_r($aTest); } echo "</pre>"; ?> Expected result: ---------------- Parse error. Can't do a =!. Should be a != Actual result: -------------- Array ( [name] => And [email] => test@test.com ) Array ( [name] => 1 [email] => test@test.com )