[prev in list] [next in list] [prev in thread] [next in thread] 

List:       php-windows
Subject:    Re: [PHP-WIN] Re: Problems with fscanf [WORKAROUND] fgetc
From:       "=?UTF-8?Q?German_Piqu=C3=A9?=" <extremdur2 () gmail ! com>
Date:       2006-09-29 10:51:18
Message-ID: 80f1761b0609290351x7ac4a533vf5a066fa2822c34b () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (text/plain)]

I didn't kwon that! :O

Thanks!


2006/9/29, Luis Moreira <lamoreira@bes.pt>:
>
> The "{} syntax" means to run a command whithin another command, whitout
> having to store results previously.
>
> As an example, both following codes do the same, and you don't loose time
> storing and retrieving variable $argo
>
> $argo = fgets($fileID,sizeof($file));
> Echo "$argo";
>
> And
>
> Echo "{fgets($fileID,sizeof($file))}";
>
>
> Luis
>
>
>
> -----Original Message-----
> From: German Piqué [mailto:extremdur2@gmail.com]
> Sent: sexta-feira, 29 de Setembro de 2006 11:35
> To: Alex Turner
> Cc: php-windows@lists.php.net; Stanislav Malyshev
> Subject: Re: [PHP-WIN] Re: Problems with fscanf [WORKAROUND] fgetc
>
> mmm... let me guess...
>
> you're saying that I must do something like this:
>
> $argo = fgets($fileID,sizeof($file))
>
> And then work with the string?
>
> What do you mean by "using {} syntax"? Are you talking about regular
> expressions or what?
>
> Thanks.
>
>
> 2006/9/28, Alex Turner <aturner@project-network.com>:
> >
> > Stanislav Malyshev wrote:
> > > German Piqué wrote:
> > >> Well, I managed to work with the spaces but using fgetc instead of
> > >> fscanf.
> > >>
> > >
> > > Just as a note I think it would be much more efficient to use fgets
> > > or fread and then parse resulting string using regular expressions.
> > > Unless you have some limitations that weren't mentioned.
> > > Just as a note I think it would be much more efficient to use fgets
> > > or fread and then parse resulting string using regular expressions.
> > > Unless you have some limitations that weren't mentioned.
> >
> > That got me thinking - how about using fgets then running over the
> > string using {} syntax.  The same code (almost) would run many many
> > times faster (probably).
> >
> > AJ
> >
> > --
> > www.deployview.com
> > www.nerds-central.com
> > www.project-network.com
> >
> > --
> > PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit:
> > http://www.php.net/unsub.php
> >
> >
>
>


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic