php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #21979 mistake of operator "if"
Submitted: 2003-01-31 06:36 UTC Modified: 2003-01-31 06:42 UTC
From: alex_pidodny at hotmail dot com Assigned:
Status: Not a bug Package: Scripting Engine problem
PHP Version: 4.3.0 OS: windows 2000
Private report: No CVE-ID: None
 [2003-01-31 06:36 UTC] alex_pidodny at hotmail dot com
can't  work a script
  $r=0;
  if ($r=1) {$a=1;} //comparison on equal
  else {$a=0;}
  print "Result=$a"; 
i see always "Result=1" 
but can work a script
  $r=0;
  if ($r==1) {$a=1;} //comparison on identical
  else {$a=0;}
  print "Result=$a";
i did see manual of PHP what must work both ways


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-01-31 06:41 UTC] cynic@php.net
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

= is not the same as ==

 [2003-01-31 06:42 UTC] cynic@php.net
erm, where in the manual did you see the first version?

 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Wed Sep 18 21:01:26 2024 UTC