2009/2/2 Gavin Hodge gavin.ho...@gmail.com
Hi,
I'm fairly new to PHP, having migrated from the Java / C# world.
I wrote some code similar to the following:
$success = true;
$success = operation1();
$success = operation2();
if ($success === true) {
operation3(); // depends on 1 and 2
-Original Message-
From: farn...@googlemail.com [mailto:farn...@googlemail.com] On Behalf
Of Edmund Hertle
Sent: Monday, February 02, 2009 7:03 AM
To: Gavin Hodge
Cc: php-general@lists.php.net
Subject: Re: [PHP] Boolean Assignment Operator
2009/2/2 Gavin Hodge gavin.ho
It actually will return FATAL ERROR or something like that since you didn't
echo'ed variables or string ;)
On Mon, Feb 2, 2009 at 3:03 PM, Edmund Hertle edmund.her...@student.kit.edu
wrote:
2009/2/2 Gavin Hodge gavin.ho...@gmail.com
Hi,
I'm fairly new to PHP, having migrated from the
On Mon, Feb 2, 2009 at 7:49 AM, Gavin Hodge gavin.ho...@gmail.com wrote:
Hi,
I'm fairly new to PHP, having migrated from the Java / C# world.
I wrote some code similar to the following:
$success = true;
$success = operation1();
$success = operation2();
if ($success === true) {
Wow, thanks for the quick replies!
I hadn't realised that was purely a bitwise operator.
In the strongly-typed Java world, works as a non-lazy (exhaustive?)
boolean operator so it has to return a boolean for boolean inputs.
Thats the difference here, and Robert got it in one.
Gavin.
PS. A
2009/2/2 Robert Cummings rob...@interjinn.com
On Tue, 2009-02-03 at 00:07 +1100, Gavin Hodge wrote:
In Java / C# / C,
$bool = $anotherBool;
is shorthand for
$bool = $bool $anotherBool;
So = forces a reference assignment?
No, = forces reference assignment. = works as you have
On Mon, 2009-02-02 at 23:49 +1100, Gavin Hodge wrote:
Hi,
I'm fairly new to PHP, having migrated from the Java / C# world.
I wrote some code similar to the following:
$success = true;
$success = operation1();
$success = operation2();
if ($success === true) {
operation3(); //
2009/2/2 Gavin Hodge gavin.ho...@gmail.com
Hi,
I'm fairly new to PHP, having migrated from the Java / C# world.
I wrote some code similar to the following:
$success = true;
$success = operation1();
$success = operation2();
if ($success === true) {
operation3(); // depends on 1 and
On Tue, 2009-02-03 at 00:07 +1100, Gavin Hodge wrote:
In Java / C# / C,
$bool = $anotherBool;
is shorthand for
$bool = $bool $anotherBool;
So = forces a reference assignment?
No, = forces reference assignment. = works as you have written.
Cheers,
Rob.
--
http://www.interjinn.com
Hi,
I'm fairly new to PHP, having migrated from the Java / C# world.
I wrote some code similar to the following:
$success = true;
$success = operation1();
$success = operation2();
if ($success === true) {
operation3(); // depends on 1 and 2 being successful
}
This didn't work as expected.
In Java / C# / C,
$bool = $anotherBool;
is shorthand for
$bool = $bool $anotherBool;
So = forces a reference assignment?
On Tue, Feb 3, 2009 at 12:03 AM, Edmund Hertle
edmund.her...@student.kit.edu wrote:
2009/2/2 Gavin Hodge gavin.ho...@gmail.com
Hi,
I'm fairly new to PHP, having migrated
11 matches
Mail list logo