Bug #70569 [Opn->Nab]: Conditional check error

From: Date: Thu, 24 Sep 2015 09:27:07 +0000
Subject: Bug #70569 [Opn->Nab]: Conditional check error
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-196200@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=70569&edit=1

 ID:                 70569
 Updated by:         requinix@php.net
 Reported by:        call at woola dot net
 Summary:            Conditional check error
-Status:             Open
+Status:             Not a bug
 Type:               Bug
 Package:            *General Issues
 Operating System:   window
 PHP Version:        5.5Git-2015-09-24 (Git)
 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

http://php.net/manual/en/language.operators.precedence.php


Previous Comments:
------------------------------------------------------------------------
[2015-09-24 09:19:07] call at woola dot net

Description:
------------
for example:

1. 

$result = (true and false);

now this right  $result  is "false"

2.


$result = true && false;

now this right  $result  is "false"


3.

$result = true and false;

now is will error  $result  is "true"




Test script:
---------------
<?php

//for example:1. 

$result = (true and false);

echo "right result: $result";
//for example:2. 
$result = true && false;

echo "right result: $result";

//for example:3. 
$result = true and false;

echo "error result: $result";



?>

Expected result:
----------------
$result = true and false;

it should be equal to "false"



------------------------------------------------------------------------



--
Edit this bug report at https://bugs.php.net/bug.php?id=70569&edit=1


Thread (2 messages)

« previous php.bugs (#196200) next »