On Thu, Oct 29, 2009 at 10:23 AM, Martin Scotta wrote:
> On Thu, Oct 29, 2009 at 11:11 AM, Robert Cummings wrote:
>
>> Ashley Sheridan wrote:
>>
>>> On Thu, 2009-10-29 at 13:58 +, Mark Skilbeck wrote:
>>>
>>> How is the following evaluated:
[code]
if ($data = somefunc()) ...
>>
Ashley Sheridan wrote:
On Thu, 2009-10-29 at 13:58 +, Mark Skilbeck wrote:
How is the following evaluated:
[code]
if ($data = somefunc()) ...
[/code]
Ignoring the 'assignment inside condition' arguments, is the return
value of somefunc() assigned to $data, and then $data's value is
eval
On Thu, Oct 29, 2009 at 10:58 AM, Mark Skilbeck wrote:
> How is the following evaluated:
>
> [code]
> if ($data = somefunc()) ...
> [/code]
>
> Ignoring the 'assignment inside condition' arguments, is the return value
> of somefunc() assigned to $data, and then $data's value is evaluated (to
> tru
On Thu, 2009-10-29 at 13:58 +, Mark Skilbeck wrote:
> How is the following evaluated:
>
> [code]
> if ($data = somefunc()) ...
> [/code]
>
> Ignoring the 'assignment inside condition' arguments, is the return
> value of somefunc() assigned to $data, and then $data's value is
> evaluated (t
That's a variable variable name.
http://us2.php.net/manual/en/language.variables.variable.php
So
$temp3 = 'valueoftemp3';
$temp2 = 'temp3';
$temp = $$temp2;
$$temp2 === $temp3;
Song Ken Vern wrote:
Hi,
Tried searching for what this $$ operator means.
But can't get the right results by using $$ a
On Friday 10 December 2004 12:02, Song Ken Vern wrote:
> Tried searching for what this $$ operator means.
> But can't get the right results by using $$ as search string in php manual.
>
> $temp = $$temp2;
Search for "variable variables"
> Is this an array assignment?
No, but in most cases where
On Dec 9, 2004, at 10:02 PM, Song Ken Vern wrote:
Hi,
Tried searching for what this $$ operator means.
But can't get the right results by using $$ as search string in php
manual.
$temp = $$temp2;
Is this an array assignment?
No, its a variable varible:
http://us2.php.net/manual/en/language.variab
variables variable?
http://us2.php.net/manual/en/language.variables.variable.php
- Original Message -
From: "Song Ken Vern" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, December 09, 2004 11:02 PM
Subject: [PHP] assignment
> Hi,
>
> Tried searching for what this $$ operato
Exactly what you just did will work ...
$a, $b and $c all are 1 now.
--Joe
--
Joe Stump <[EMAIL PROTECTED]>
http://www.joestump.net
"Label makers are proof God wants Sys Admins to be happy."
-Original Message-
From: Andrew D. Luebke [mailto:[EMAIL PROTECTED]
Sent: Friday, May 30, 200
just a little update after playing arround with this stuffs,
I think this behavior happens when there is nothing else pointing to variable $a.
so for example, this works also:
$tmp =& $a;
$a =& $a->next;
I'm wondering how php does garbage collection? does it immediately delete variables
th
> Please note, there are many German PHP developers. Most of them are
> not so stupid ...
Oh, I don't know about that. I have met a bunch of them... ;)
-Rasmus
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
[EMAIL PROTECTED] wrote:
> I think this is a nice idea for php8 (or some release, I´ll never have
> to use)
> The main thing in using php is that it is close to c.
> As there are so many new functions, some of them are not really
> necessary,
> I would not prefer shortcuts like these. Who shoul
Egon Schmid wrote:
>From: "Enrico Weigelt" <[EMAIL PROTECTED]>
>
>
>Please note, there are many German PHP developers. Most of them are
>not so stupid ...
>
I must say I fail to understand both the meaning and the reason for the
harsness in your reply.
Bogdan
--
PHP General Mailing List (h
From: "Enrico Weigelt" <[EMAIL PROTECTED]>
> On Thu, Mar 21, 2002 at 12:36:26AM +0200, Bogdan Stancescu wrote:
>
> > Hi all!
> >
> > I'd like to hear from a single one of you who isn't tired of
code similar to
>
> i'm solving this with some little knowledge of shortcuts
evaluation ...
>
> > > i
At 21.03.2002 00:36, you wrote:
>Hi all!
>
>I'd like to hear from a single one of you who isn't tired of code similar to
>
> if (!$whatever) {
>$whatever=something;
> }
>?>
>
>or else
>
> if ($whatever)
> {
>$somethingelse=$whatever;
> }
>?>
>
>How about a new asignment operator whic
There seems to be a parse error in your code. The words "Python" and
"enthusiast" can not exist together in the same substr. This will
result in the "LMAO error" you've been receiving. :)
-Kevin
-Original Message-
From: Bogdan Stancescu [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, Marc
On Thu, Mar 21, 2002 at 12:36:26AM +0200, Bogdan Stancescu wrote:
> Hi all!
>
> I'd like to hear from a single one of you who isn't tired of code similar to
i'm solving this with some little knowledge of shortcuts evaluation ...
> if (!$whatever) {
>$whatever=something;
> }
> ?>
(($wh
Dan wrote:
>
> This confused me for awhile, because the single equal sign seemed to work
> for comparison, but created inexplicable errors in my programs. It seems
> strange to me that a successful variable value assignment does not return
> true.
>
> example:
>
>
> $shiny = 1;
> if($shiny
Hi,
Dan wrote:
> > > if($shiny = 0){
> > This does not compare anyting, it assigns 0 to $shiny
>
> yes i know, but shouldnt this operation return true?
No, it doesn't return true.
The "=" operator returns the value of the expression on its right hand side.
Therefore, the statement given above
> if($shiny = 0)
This line is the same as
if ((shiny = 0) == TRUE)
It's common error with PHP and C.
You could make use of this like
if ($fp = fopen($filename,'r'))
since this is the same as
if (($fp = fopen($filename,'r')) == TRUE)
code after this line is executed when fopen() success to
You are right, thank you.
> It looks to me like the value of an assignment is the value assigned, as
in
> Perl. But I don't know for sure, haven't come across this in the manual.
>
> Kirk
>
> > > > if($shiny = 0){
> > > This does not compare anyting, it assigns 0 to $shiny
> >
> > yes i know, bu
L PROTECTED]
> Subject: Re: [PHP] assignment operator works for comparison??
>
>
>
> >
> > > if($shiny = 0){
> > This does not compare anyting, it assigns 0 to $shiny
>
> yes i know, but shouldnt this operation return true?
--
PHP General Mailing List (
>
> > if($shiny = 0){
> This does not compare anyting, it assigns 0 to $shiny
yes i know, but shouldnt this operation return true?
>
> > echo( $shiny ) // this will return 0
> That's normal, you just assign 0 to it ;)
>
> = assignment operator
> == comparison operator
>
> py
>
>
> At 01:53 PM
> if($shiny = 0){
This does not compare anyting, it assigns 0 to $shiny
> echo( $shiny ) // this will return 0
That's normal, you just assign 0 to it ;)
= assignment operator
== comparison operator
py
At 01:53 PM 4/10/01 -0700, you wrote:
>This confused me for awhile, because the single eq
24 matches
Mail list logo