Ask a Question related to PHP Bugs, Design and Development.
-
johannes@php.net #1
#39334 [Opn->Bgs]: Value und type of var changes in if statement
ID: 39334
Updated by: [email]johannes@php.net[/email]
Reported By: sw4u at gmx dot net
-Status: Open
+Status: Bogus
Bug Type: Variables related
Operating System: Debian Linux 3.1
PHP Version: 4.4.4
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
[url]http://www.php.net/manual/[/url] and the instructions on how to report
a bug at [url]http://bugs.php.net/how-to-report.php[/url]
Please check the operator precedence and use parenthesis. See
php.net/operator
Previous Comments:
------------------------------------------------------------------------
[2006-11-01 14:47:07] sw4u at gmx dot net
Description:
------------
Only the last var in an if statement with function call is returned as
expected. The other types are changed to bool.
Debian Linux 3.1
Server API Apache 2.0 Handler
Default Debian installation
Apache/2.0.54 (Debian GNU/Linux) PHP/4.3.10-16
Reproduce code:
---------------
<?php
function test($string){
return ($string);
}
if( $a = test("a") && $b = test("b") && $c = test("c") ){
echo $a;
echo $b;
echo $c;
}
?>
Expected result:
----------------
abc
Actual result:
--------------
11c
------------------------------------------------------------------------
--
Edit this bug report at [url]http://bugs.php.net/?id=39334&edit=1[/url]
johannes@php.net Guest
-
#39334 [NEW]: Value und type of var changes in if statement
From: sw4u at gmx dot net Operating system: Debian Linux 3.1 PHP version: 4.4.4 PHP Bug Type: Variables related Bug... -
Type mismatch in assignment statement
Hi all, Here my problem tcrComp1.method = method.selectedItem; In the left side:: tcrComp1: an object of type TCRComponents method : is an... -
Need help with SQL statement for JOIN-type stuff
Mike wrote: > "Bob Barrows " <SPAMcom> wrote in message > news:<phx.gbl>... >> Mike wrote: >>> >>> So, does anyone know how to 1) turn off... -
How do I pass a collection type to a prepared statement in Informix-4gl
One way is to construct the string for prepare dynamically - ( the c_sel text ), but I think it will defeat the purpose of using prepared... -
How do I pass a collection type to a prepared statement in Informix-4gl 7.30?
Haven't used 4GL much but maybe you can use a subquery. Store the values in a temp table, then ... and field_color in (select fcolor from...



Reply With Quote

