Req #7808 [Opn->Wfx]: variable value triggerd by function
| From: | jani@php.net | Date: | Wed, 24 Nov 2010 12:55:52 +0000 |
| Subject: | Req #7808 [Opn->Wfx]: variable value triggerd by function | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-156379@lists.php.net to get a copy of this message | ||
Edit report at http://bugs.php.net/bug.php?id=7808&edit=1
ID: 7808
Updated by: jani@php.net
Reported by: wico at cnh dot nl
Summary: variable value triggerd by function
-Status: Open
+Status: Wont fix
Type: Feature/Change Request
-Package: Feature/Change Request
+Package: *General Issues
Operating System: any
PHP Version: 4.0 Latest CVS (14/11/2000)
Block user comment: N
Private report: N
New Comment:
Doing while($data = get_some_database_records()) works just fine.
Previous Comments:
------------------------------------------------------------------------
[2000-11-14 09:17:24] wico at cnh dot nl
I know &= is for somthing else it was just to illustrate what i ment
&= could also be something else
and
$time="time";
echo $time();
sleep(1);
echo $time();
is not where i'm looking for
Please read carefully and try to understand what i mean
Greetz,
Wico
------------------------------------------------------------------------
[2000-11-14 09:11:15] hholzgra@php.net
'&=' has a very different meaning
'$i &= $j' is an abbreviation of '$i = $i & $j'
and '&' being the binary 'bitwise and' operator,
not the unary 'get reference for'
what you are looking for is
$time="time";
echo $time();
sleep(1);
echo $time();
and this already works ...
------------------------------------------------------------------------
[2000-11-14 08:54:13] wico at cnh dot nl
Hiya
I don't know how to call it but i thing i could be usefull
example:
$time &= time(); // var to function
echo $time; // current time
sleep(1);
echo $time; // still current time
example 2:
$data &= get_some_database_records();
while ($data) {
echo $data;
}
Get_some_database_records will give every time its called the next var
(until false)
This are just a examples i know some other thing you can do with it but
there yes for your imagenation :)
Greetz,
Wico
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/bug.php?id=7808&edit=1