php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #7808 variable value triggerd by function
Submitted: 2000-11-14 08:54 UTC Modified: 2010-11-24 13:55 UTC
From: wico at cnh dot nl Assigned:
Status: Wont fix Package: *General Issues
PHP Version: 4.0 Latest CVS (14/11/2000) OS: any
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please — but make sure to vote on the bug!
Your email address:
MUST BE VALID
Solve the problem:
33 - 10 = ?
Subscribe to this entry?

 
 [2000-11-14 08:54 UTC] 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

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2000-11-14 09:11 UTC] 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 09:17 UTC] 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




 [2010-11-24 13:55 UTC] jani@php.net
-Status: Open +Status: Wont fix -Package: Feature/Change Request +Package: *General Issues
 [2010-11-24 13:55 UTC] jani@php.net
Doing while($data = get_some_database_records()) works just fine.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Mar 28 17:01:29 2024 UTC