[PHP] fscanf and memory

2004-02-26 Thread Sébastien Guay
Hi, I don't know if it's a bug in php but if I do $fp=fopen("some_file","r"); while (!feof($fp)) { fscanf($fp, "%d %d",&$var1,&$var2); // some treatment } fclose($fp); and the file is big enough, php eat up memory like hot cakes. But if I do $fp=fopen("some_file","r"); while (!feof($fp)) {

Re: [PHP] fscanf and memory

2004-02-26 Thread Tom Rogers
Hi, Friday, February 27, 2004, 4:48:20 AM, you wrote: SG> Hi, SG> I don't know if it's a bug in php but if I do SG> $fp=fopen("some_file","r"); SG> while (!feof($fp)) SG> { SG> fscanf($fp, "%d %d",&$var1,&$var2); SG> // some treatment SG> } SG> fclose($fp); SG> and the file is big enoug