Re: [PHP] Why is the php loop, 'for()', so slow????

2003-11-20 Thread Scott Fletcher
Well, should have make one long string to the $res_str variable a lot shorter. :-) It turned out that the for() loop isn't the slow part when you mentioned about substr(). I tried out the while() loop and it is pretty much the same when the loop take over 5 minutes. So, it now seem to have to

Re: [PHP] Why is the php loop, 'for()', so slow????

2003-11-20 Thread Scott Fletcher
I can give the strpos() a shot but I seem to have problem with getting the strpos() to give me two seperate !CDATA[[]] tags instead of just hte first one only... Scott Curt Zirzow [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Scott, Please dont post 500+ lines of stuff to the

RE: [PHP] Why is the php loop, 'for()', so slow????

2003-11-20 Thread Wouter van Vliet
if PHP sets $1, $2, .. vars, else give the optional third Matches param to preg_match(); Wouter -Oorspronkelijk bericht- Van: Scott Fletcher [mailto:[EMAIL PROTECTED] Verzonden: donderdag 20 november 2003 15:44 Aan: [EMAIL PROTECTED] Onderwerp: Re: [PHP] Why is the php loop

Re: [PHP] Why is the php loop, 'for()', so slow????

2003-11-20 Thread Eugene Lee
On Thu, Nov 20, 2003 at 09:45:45AM -0500, Scott Fletcher wrote: : : I can give the strpos() a shot but I seem to have problem with getting the : strpos() to give me two seperate !CDATA[[]] tags instead of just hte : first one only... Use the offset parameter: ?php $haystack

[PHP] Why is the php loop, 'for()', so slow????

2003-11-19 Thread Scott Fletcher
Hi Everyone! Why does the for() loop for PHP so slow when it is digesting a large amount of data? Is there a way to make the loop go faster? Thanks, Scott -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] Why is the php loop, 'for()', so slow????

2003-11-19 Thread Chris W. Parker
Scott Fletcher mailto:[EMAIL PROTECTED] on Wednesday, November 19, 2003 12:11 PM said: Why does the for() loop for PHP so slow when it is digesting a large amount of data? Is there a way to make the loop go faster? Show us your loop. -- Don't like reformatting your Outlook replies

Re: [PHP] Why is the php loop, 'for()', so slow????

2003-11-19 Thread Scott Fletcher
, November 19, 2003 12:11 PM said: Why does the for() loop for PHP so slow when it is digesting a large amount of data? Is there a way to make the loop go faster? Show us your loop. -- Don't like reformatting your Outlook replies? Now there's relief! http://home.in.tum.de/~jain/software/outlook

Re: [PHP] Why is the php loop, 'for()', so slow????

2003-11-19 Thread Eugene Lee
On Wed, Nov 19, 2003 at 03:10:39PM -0500, Scott Fletcher wrote: : : Why does the for() loop for PHP so slow when it is digesting a large : amount of data? Is there a way to make the loop go faster? Maybe it's your for() loop that's constructed in a less optimal way. Some source code would

Re: [PHP] Why is the php loop, 'for()', so slow????

2003-11-19 Thread Ray
$CBC_TransUnionHTML.brbrbr; Chris W. Parker [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Scott Fletcher mailto:[EMAIL PROTECTED] on Wednesday, November 19, 2003 12:11 PM said: Why does the for() loop for PHP so slow when it is digesting a large amount of data

Re: [PHP] Why is the php loop, 'for()', so slow????

2003-11-19 Thread Scott Fletcher
] on Wednesday, November 19, 2003 12:11 PM said: Why does the for() loop for PHP so slow when it is digesting a large amount of data? Is there a way to make the loop go faster? Show us your loop. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net

Re: [PHP] Why is the php loop, 'for()', so slow????

2003-11-19 Thread Scott Fletcher
Sample code is found in earlier posting... Someone post a reply on a seperate thread... Scott Eugene Lee [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] On Wed, Nov 19, 2003 at 03:10:39PM -0500, Scott Fletcher wrote: : : Why does the for() loop for PHP so slow when

RE: [PHP] Why is the php loop, 'for()', so slow????

2003-11-19 Thread Chris W. Parker
Scott Fletcher mailto:[EMAIL PROTECTED] on Wednesday, November 19, 2003 1:12 PM said: function CBC_XML_BreakUp($strResponse_XML, $strResponse_HTML) { [snip] Wow I didn't think you were going to post your whole program. :0 1. Are you sure the for() loop is the slow part? 2. As someone

Re: [PHP] Why is the php loop, 'for()', so slow????

2003-11-19 Thread Eugene Lee
On Wed, Nov 19, 2003 at 04:54:39PM -0500, Scott Fletcher wrote: : : Ray [EMAIL PROTECTED] wrote: : try : $res_str_len = strlen($res_str); : for ($i=1;$i$res_str_len;++$i) : : one less function call in the loop and the prefix version of ++ is : sometimes a tad faster then the postfix

Re: [PHP] Why is the php loop, 'for()', so slow????

2003-11-19 Thread Curt Zirzow
Scott, Please dont post 500+ lines of stuff to the list. You only needed to post the relevent code relevent to the subject at hand. * Thus wrote Scott Fletcher ([EMAIL PROTECTED]): for ($i=1;$istrlen($res_str);$i++) { if (substr($res_str, $i, 9) == ![CDATA[) You should really use