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
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: wico at cnh dot nl
New email:
PHP Version: OS:

 

 [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-2017 The PHP Group
All rights reserved.
Last updated: Sun Nov 19 01:31:42 2017 UTC