Date: 11/14/00
- Next message: stas <email protected>: "[PHP-DEV] PHP 4.0 Bug #7755 Updated: bitwise and misbehaving with & 0xffffff00"
- Previous message: Mike Robinson: "RE: [PHP-DEV] RE: FW: PHP.COM's courteous link to the PHP programming language website"
- In reply to: Adam Wright: "Re: [PHP-DEV] PHP 4.0 Bug #7808 Updated: variable value triggerd by function"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Hiya
I'm making some super globals (global in every script) via shared memmory
(building a emulator for using something like shared memmory under windows to)
I did like to do:
$a = SuperGlobal("a");
echo $a
using $a just like a normal var everywhere in the rest of the script
so when script 1 changes var a the script 2 will have on the moment the new
value of a
when it is being used
Im using this routine for variables that are used everywhere (cache and stuff)
As you say i can call the function to update it everthime i use a but i
find it more usefull as an normal var
Hope you understand what i'm makeing
No go argue with me :)
Greetz,
Wico
P.S. don't watch the bad english :)
At 14:32 14-11-00 +0000, Adam Wright wrote:
> From your example 1, it looks you want the value of $time to be the value
>returned by time() at any point where you deference the $time variable (as
>opposed to $time being a reference to the function), so in effect, the
>variable becomes a macro for "run this function and assign its returned
>value to this variable". Why you'd want this is beyond me, as its more
>likely to get confusing. Why not just write it out in full (use ($time =
>time())? Or, as already suggested, $time="time"; $time();.
>
>I can't think of a convincing argument for your method. For example, what
>happens when the function you assigned takes parameters?
>
>adamw
>
>----- Original Message -----
>From: <wico <email protected>>
>To: <php-dev <email protected>>
>Sent: Tuesday, November 14, 2000 2:17 PM
>Subject: [PHP-DEV] PHP 4.0 Bug #7808 Updated: variable value triggerd by
>function
>
>
> > ID: 7808
> > User Update by: wico <email protected>
> > Old-Status: Closed
> > Status: Open
> > Bug Type: Feature/Change Request
> > Description: variable value triggerd by function
> >
> > 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
> >
> >
> >
> >
> >
> > Previous Comments:
> > --------------------------------------------------------------------------
>-
> >
> > [2000-11-14 09:11:15] hholzgra <email protected>
> >
> > '&=' 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 <email protected>
> > 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
> >
> > --------------------------------------------------------------------------
>-
> >
> >
> > Full Bug description available at: http://bugs.php.net/?id=7808
> >
> >
> > --
> > PHP Development Mailing List <http://www.php.net/>
> > To unsubscribe, e-mail: php-dev-unsubscribe <email protected>
> > For additional commands, e-mail: php-dev-help <email protected>
> > To contact the list administrators, e-mail: php-list-admin <email protected>
> >
> >
>
>
>--
>PHP Development Mailing List <http://www.php.net/>
>To unsubscribe, e-mail: php-dev-unsubscribe <email protected>
>For additional commands, e-mail: php-dev-help <email protected>
>To contact the list administrators, e-mail: php-list-admin <email protected>
-- PHP Development Mailing List <http://www.php.net/> To unsubscribe, e-mail: php-dev-unsubscribe <email protected> For additional commands, e-mail: php-dev-help <email protected> To contact the list administrators, e-mail: php-list-admin <email protected>
- Next message: stas <email protected>: "[PHP-DEV] PHP 4.0 Bug #7755 Updated: bitwise and misbehaving with & 0xffffff00"
- Previous message: Mike Robinson: "RE: [PHP-DEV] RE: FW: PHP.COM's courteous link to the PHP programming language website"
- In reply to: Adam Wright: "Re: [PHP-DEV] PHP 4.0 Bug #7808 Updated: variable value triggerd by function"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

