Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
 
  HOME    TRACKER    PHP




For Loop Performance


Is a difference in performance between the two following for loops?




View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
If Loop In A While Loop Producing Incorrect Results
I have this code that checks to see what the value of "del" is and places a certain word depending on if its a 0 or 1. PHP Code:

Creating Table Rows For Ever Other Loop In A WHILE Loop
I'm trying to create a table using a MySQL fetch array while loop that would look like this:

CONTENT1     CONTENT2
CONTENT3     CONTENT4
CONTENT5     CONTENT6

I need a <TR></TR> for every other piece of content. But I don't know how to do this with a loop that uses a MySQL fetch array

while($row = mysql_fetch_array($result, MYSQL_ASSOC))

{
PHP CODE THAT IS LOOPED;};

I'm trying to remember from my old college Java class that we did something with loops for whenever the counter variable was even the loop would do something special... I don't know if this is possible with a while+mysql_fetch_array loop though.

Creating A For Loop Inside Another For Loop.
I'm trying to write a script that will display questions that are in one flat file and answers from another flat file. In addition, there are copies of these files with their own data in multiple folders.

I created a for loop to work with an array of the different file paths to the different folders. Then I created a for loop inside of that one to display the questions and answers files that is in each folder. All I get when I run the script is the first folder and it's questions and then it stops there. PHP Code:

Get A Varable To Loop Out Side The Loop
i need to get the varable to loop out side the loop but the condition set within the loop so the varable loop's outside. Code:

Bad Performance With Php 5.2.0
I'm running OmniHTTPd/2.10 with php on a Win2k SP4 machine with various php applications (for example phpMyAdmin and cacti).

Until now I was using php 5.0.4 without problems. I updated to php 5.2.0 and now all the php applications are running *very* slow. A cacti page with some graphs on it took 16 sec to show up completly with php 5.0.4 now takes 50 sec
with php 5.2.0. Same with other php scipts.

I monitored php with the taskman. With php 5.0.4 some php-cgi.exe show up, using up to 99% cpu never going to 0%. With php 5.2.0 the same php-cgi.exe show up, but using only 30% to 40% cpu, dropping periodically to 0% cpu, then back to 30%, then back to 0% and so on.

IIS PHP Performance
I have IIS 5.0 Windows 2K SPs and patches sitting on a dual P3 1000
Mhz. box with RAID.

When I do a stress test with MS IIS web stress tool, system cannot
handle more than 50 request / sec. On the other hand asp has no
problem with 5 - 10 times more.

To test it further more I tried to determine where the most of cycle
spent I came to a conclusion that it is actually not the parsing and
running of the script but loading the php module. I tried the same
test with an empty php file results are almost the same which suggests
I think, only thing done is php module is loaded.

I suppose the libraries are being loaded and disposed so much, so it
has something to do something with caching.

Performance Hit With OOP?
I found myself writing the following comment in the overall
constructor comment for the class McLoops. And when I got done writing
this comment, I began to wonder, damn, at what point does the
performance hit become too expensive to scale? Does anyone have any
stats on this? How many calls to a database can you have on one page
before that page becomes painfully slow? How many hits does it take to
slow a plain html file versus a simply included() PHP file versus a
system like Smarty? How many lines of code does Phorum execute to
render a forum with 200 entries in it?

Does anyone know where such statistics can be found?

* It's worth noting where McLoops fits into the picture. Please
consider the complete history
* of a single function: showLinkArea(). These are the events:
*
* 01. showLinkArea() is encountered in a template and executed
* 02. showLinkArea() sends McControllerForAll the string
"showLinkArea"
* 03. McControllerForAll sends "showLinkArea" to McRunCommand
* 04. McRunCommand calls up CommandShowLinkArea and calls test()
* 05. If test() returns true then McRunCommand calls the
command() method of CommandShowLinkArea
* 06. CommandShowLinkArea calls for an arrangement called
"showLinkArea"
* 07. showLinkArea.php, the arragement, in default form calls
elementsPublicListAllForLinkArea()
* 08. elementsPublicListAllForLinkArea(), calls up McLoops and
runs through it.
* 09. elementsPublicListAllForLinkArea(), sets "SeekArrangement"
as the action object for McLoop
* 10. McLoops loads ActionsSeekArrangement and calls its 4 action
methods
* 11. ActionsSeekArrangement loads many arrangments to output the
various aspects of the link area
* 12. ActionsSeekArrangement, by calling other arrangements,
probably causes dozens of element() functions to be called.
* 13. Those element() functions in turn call many other objects.

Mind you, this is one function. There might be 20 functions in a
template. Or more.

PHP IIS Performance
I have IIS 5.0 Windows 2K SPs and patches sitting on a dual P3 1000
Mhz. box with RAID.

When I do a stress test with MS IIS web stress tool, system cannot
handle more than 50 request / sec. On the other hand asp has no
problem with 5 - 10 times more.

To test it further more I tried to determine where the most of cycle
spent I came to a conclusion that it is actually not the parsing and
running of the script but loading the php module. I tried the same
test with an empty php file results are almost the same which suggests
I think, only thing done is php module is loaded.

I suppose the libraries are being loaded and disposed so much, so it
has something to do something with caching.

Being a big fan of open source community I was dissappointed with
that.

So am I right that
- This is related to initialization of php for each request?
- Is there a way to cache php?

Measuring Performance Of PHP
I'm writing PHP Web sites that are database driven with mysql.

I'm looking for ways to measure the performance (speed) of my php code, so
that I can find ways to write the fastest php code. Any suggestions?

Mail() Performance
Someone can tell me why the mail() function is slowly, when sending 500 email (looping a mysql table)? Note = I am using Apache Web Server under Win98... is this the problem????

Java Performance With PHP
Does anyone out there know what generally how performance issues are affected when you use Java objects with php scripts?

Php & Ms Sql Server Performance
I have a local database in MSSQL server and I am given a task to develop a system to input and retrive data from the database and generate various kind of reports. Its a subscriber's databse and may range till 100K.

I am very good with PHP and mysql but since I had to build a local application i thought of going for VB.

I dont know VB and will have to learn it first. I wanted to give PHP a try and bulid the local application which can also be used on the intranet. I have a windows 2K, apache, php and ms sql setup.

Is it possible to develop a system which can handle long running processes like imports and exports with such a database? Can i use sessions successfully on the intranet to give restricted access to users?

The main thing is how compatible is php with mssql server. Will the performance be good or i should go for an application in VB?

Performance Inquiry
Imagine three options:

a) There is an XML file. A PHP5 script loads it and puts it into a DOM
document object. Then, given an input string, a function looks via XPath
for a node with that name (or possibly value of an attribute) and returns
the node's content.

b) There is a text file containing a serialized array. PHP script opens it
and deserializes the array into a variable; then, given an input string,
looks for an array element with the same key and returns the element's
value.

c) There is a PHP file containing just a definition for an array. PHP
script includes it and, given an input string, looks for an array element
with the same key and returns the element's value.

Does anyone have any idea which option would be the fastest, and which the
slowest of the three?

Performance Comparisons?
Has anyone done any performance comparisons between what one might
call the 'program' vs 'interjection' models?

What I'm calling the 'program' model is putting a '<?php' invocation
at the top of the page, a '?>' exit at the bottom, and doing all the
html output via echo statements.

The 'interjection' model, in contrast, repeatedly invokes php for
minimal periods instead, so instead of one mass of php code, the same
amount of code is in smaller pieces and laced in and out of the html.

The interpreter must look at everything regardless, but I'm wondering
whether there's significantly more overhead one way than the other.
From the fact that 'echo' isn't actually a function, my guess is that
the overhead might be a wash, but does anyone know of any actual
performance tests?

Performance MySQL 5.0.11
Using LIMIT on large tables slows Queries down to a crawl when using
like comparisons (I understand that there is a fix in the beta
release) but what I am wondering is whether you all think that there is
a problem in returning a record set of say 10,000 rows and using a
foreach loop to display just a few of them) ie doing the limiting
within the PHP realm?

Ps I am offline for a few days so if I dont reply to the thread it is
not out o rudeness ;-)

Templates = Better Performance?
I'm working on a web site that has a common header,navigation links, and footer.

I'm thinking of just writing 3 funtions:
function header()
function navigation()
function footer ()

and saving them on a common file (something like functions.php)

Then calling the functions in each page?

Will this affect how fast the web page loads?
Will it take longer for the page to load since it has to get part of the page from another file (functions.php)?

I've read a lot of stuff on templates (www.phpbuilder.com), but I think just using functions will work fine for me since I'm not expecting to do anything too fancy with the page.

Performance When Using Php And Mysql
Can somebody tell my something about performances when using mysql and php!
Where i can find document about this performance?
How php and mysql behave in use of multiple connections?

Include() And Performance
Say I have a file functions.php that contains many functions, and in a script abc.php I have this statement: include("functions.php");

abc.php uses only one function from functions.php. Is php interpreter still parsing all other unnecessary functions in functions.php? If yes, then the bigger functions.php the poorer the performance.

Performance With Include()
Can I use include() to insert huge library files in my php programs ? Will
it be efficient enough even if I do it in every single program ?

Improving Performance....
I am parsing out some words and dumping them into a database using the below code. The way I have it now, we're executing an insert on the database for each word (everytime it loops through strtok). I know that in sql I could just build the query using a new line () and then execute the SQL once after the loop...but I can't seem to find a similar way of getting it to work in MySQL. Is it somehow possible or could someone point me in the right direction. Code:

Testing Performance For Php Pages
Somebody knows a free tool to test how many simultaneous requests a page can be served without a timeout?

Performance => Less Diskaccess / Db Access
Got another question for ya'll. Considering the following:

We are building a complex parser for documents and store the results in a mysql (for now anyway) db. There the problem arrises.

In the db we store a table with word information (lexicon) with wordID and word. While parsing documents we check every word in the document with the database (word for word) to change words into wordid's for storage.

The lexicon holds over 22 million words (indexed for first 10 characters).

Parsing causes a enormous load on the db with checking for wordID's and takes too long (2-4 sec per doc) due to diskaccess and a db which is on overload (almost).

We are currently looking for ways to increase parse-speed, decrease diskaccess (time consuming) and db load (also time consuming and causes the machineperformance to get too low).

I was thinking about ways to load the entire lexicon into memory (the fastest I guess) and let the phpscript check for wordID's from there (dunno if that is even possible).

The parsescript BTW is run from a browser.

Performance, Functions And Looping
Has anyone benchmarked the overhead of calling functions in PHP? As an example, let's say I have a function that takes a string as an argument. If this string is zero length, I want to return an empty string right away. Would I gain any time if I put the zero length test before calling the function?

Email Performance Question...
I have a db with a list of approx. 300 users. I would like create a script to send them email notices, ie: create one email and send to the list. Is this feasible in PHP using the mail( ) function in a loop? Any suggestions on mass mailing your users using php?

A Question About Efficiency & Performance
I am developing a site which will be very dynamic. Most of the displayed
content will come from a database (MySql) via PHP.

Some types of pages will change frequently (something like a forum page
which is always having new content added to it) and others will only change
once a day (a new news item gets added, etc.).

Although I can optimise my queries and my PHP scripts, there is still the
potential for the site to get congested, once a large number of people start
accessing it.

The question is how do I make sure it performs well? There are several
options I might consider, such as:
- don't do anything, but rely on server caching. Is PHP / Apache caching
any good?
- Periodically "publish" my PHP-generated pages to flat HTML pages and serve
them up instead of the PHP.
- Other things?

Php Mailing List-> Performance
i wrote a php script that sends mail to a list of email generated from a database.
this database contains about 8000 email adresses and depending on what the users chose in their preferences it sends out mail accordingly. in general this would come down to roughly 6000 emails per list.

the script iterates through the list of email addresses and send out a new email to every email address found that fits the mailing type. the box doing this is an athlon 1400Mhz.

now, my question, how heavy will this be for sendmail? i can imagine that this will take some time before all 6000 emails have been send. php is set in the ini to time out after 30 seconds and maybe this script will be running for longer than that with 6000 emails to send. i could test this but i dont think all of those people would be very happy receiving test emails.

also, i could send just one mail with all those email addresses stuffed into the Bcc header but i dont know if that would make difference and if the php mail() function likes 6000 mail addresses in the Bcc header. anyone with experience with sending large volumes of mail like this have some advice for me?

Application Performance Testing ...
We are developing an application using PHP and MySQL 4.0.16, that we need to
stress test. Can someone please point me to a testing tools we can use?

Performance -- Eval Vs Include
For those of you that have tested eval() vs. including a file many times,
I'd appreciate your comments on which one is better for performance.
My application will have a queue like routine in which I may have to include
a file many time. The file will contain a series of switch/case statements.
Depending on specified criteria, this file will need to be processed from
one time up to X times. I am not really worried about the usual case where
the file will be included less than 3-5 times in one request, however, above
that I have to wonder where to save on performance.

Those of you writing parsers are probably moreso in the know on this one,
however, anyone else that has a clue please feel free to add your 2c.

Performance Test: For + Foreach
Ever since reading an interesting article in Linux Format on PHP whereby
suggested code writing was made that could enhance performance on a server,
I've started testing various bits of code everytime I found more than one
method to perform a single task. I timed each method to find which would
complete faster. I thought I'd share my most recent results which (I
believe) should help those write their programs to be more
clean/environmentally friendly on systems resources.

If you don't want to read further, basically, I created two identical tasks
except one used a "for" loop and the other used "foreach" loop. I found
"for" loops are almost ten percent faster to use when compared to "foreach"
loops when working on arrays.

My problem (or task pending which way you want to look at it):

I had a problem whereby I had a string that I wanted to cut to x number of
words - I wanted the cut to be clean (thus not cut in the middle of a word,
but cut between words)... My solution was to convert the string in to an
array, take each array element (a single word) and append it to a new
string - then check the length of the new string and make sure it had not
exceeded maximum length. Maximum length was dynamic because sometimes I
wanted the first ten (whole) words - sometimes more...

While reading the temporary array (that contained the words), I knew I could
perform a foreach($tmpArray as $wordCount=>$aWord) or I could perform a
"for" loop that incremented a numeric variable to the maximum number of
elements in the array of words.

Call me sad - but I then wondered if using foreach on an array was
lighter/heavier on the system then using a for loop... so I put both of them
to the test. My test script below records the speed of which would complete
first - a for loop, or a foreach loop when both were required to perform the
same routine inside the loop...

I discovered that using a for loop is about ten percent faster than using a
foreach loop. A foreach loop took 45seconds on my server to perform the
same test that took 42seconds using a for loop... It might not be much, but
every little bit helps, especially if you have several users on your system
at the same time drawing on resources used by PHP.

I'm interested in any comments anyone has to offer on this...

Do Comments Impose A Performance Hit?
I've got a PHP application that's 2 megs in size. Of that, my guess is
200k-400k is comments. Do they impose a performance hit? I've been
postponing any kind of optimization, but at some point I'll have to do
it. Is taking out the comments worth it? Of all the optimizations I can
do, where should it rank?

File Size And Performance.
I am building a website and I have decided to use a couple files to do most of the work. I have a file called "functions.php" which contains all the function data and then I create smaller php files which i include the functions file in.

My question is: How many lines of code can I use in my functions.php before performance is degraded? My current file is about 1800+ lines of code at about 53k. It seens that everything works fine now, but I am only halfway done. I dont want to get to the end and find out I shouldn't have made the file too big.

PHP Vs Java Performance On MySQL
Does PHP work better than Java with MySQL? What are pros and cons of using
PHP vs Java? Which one is faster?
Can someone share the experience or point me to some good white papers or
benchmarks?

Effect Of INCLUDE() On Performance
I've included all functions used in my site in one file that is about 700 lines of code ..

Does including that file in each page affect performance . in other words, should i split it into two or three files? Noting that all what is included in the file are function that are not executed unless they are called ..

Performance/memory With Arrays?
I am working on some financial calculators and although I succeeded to created the required formulas I am not sure about the following.To give an example: when somebody puts a capital on the bank with a yearly interest of x % , the final capital after, say, 30 years can easily be calculated. Since I want to be able to show the capital created after every year I prefer to do it with a loop, something like for($x= 1; $x < 30; $x++){ $capital = $capital*(1 + $interest /100) }.

Another reason for such a loop is that the visitor could tell that he want to withdraw some capital in the so-manieth year Now let's say the visitor of the page can do a "quick scan" (just showing the final amount) and request a table with all the yearly amounts afterwards. In this case I will either have to store all the yearly capital values into a an array and register that array to a session, or I will need to do the whole loop again but this time something like:

$capital = $capital*(1+ $interest/100);
echo "<tr><td>$capital</td></tr>";

Although the formulas I "translated" from several excel sheets work fine, I would like to know if storing such arrays could have negative consequences for performance or memory on the server Alternative suggestions, of course are also welcome. I tried to find similar scripts on Google but I wasn't very successfull, probably because I am not
very familiar with the English financial terms.

How To Increase PHP/pgsql Develop. Performance?
Can anyone give me recomendations on software that can increase my performance when devenlopping Php and Postgres applications?
I'm currently working on a big project and its taking too long (3 people working on it).

Performance If MySQL Is On Remote Server
How well does PHP/MySQL perform if MySQL is located on another server? The server my site uses now just can't handle the database traffic we get (esp. from vB), so I was thinking of possibly using a remote server for MySQL. Is there a noticeable difference (at all)? I'm sure it'll be better than the time 4 of us shot the load up to 20+ by hitting the forum at the same time.

Grouping Cache Data For Performance
I plan to use memcached for caching and our pages use data from
about 6-10 lookup tables per page. Which is a better option for
better performance?

1. Cache data from lookup tables individually with a differend id.
2. Cache data from all lookup tables for the page under one id.

The first option would result in several caches (one for each table
without redundancy) but these little caches could be used across
multiple pages. Whereas the second one results in fewer caches with
mostly redundant data in each cache. The thing that is not clear to
me is getting multiple caches to stuff into a page might consume
more time compared to getting just one cache (with all the lookup
data) for the page. If this is not clear, here is an example:

product_category
product_sector
product_type

Instead of generating 3 caches for the page with 3 get()s, it could
be just one cache of large array of 3 tables with just one get().

Please clarify which would have a better performance.

Performance Of Fetching MySQL Result
Is there a real performance difference between mysql_fetch_array(), mysql_fetch_object(), and mysql_fetch_row()?

Quick Question About Performance With MySQL & PHP
Just a quick question about performance with MySQL & PHP. If I had a table
in a MySQL database with about 100,000 records in it and I need to find the
last record is there a quick way to do this, other than going through the
whole database to find the last record? Would the amount of records in the
table cause major performance problems?

For example, if I had a html form that people used to log something and
needed to display a unique number each time the page was loaded, reason
being thas this unique number could be given to people as a reference
number.

The reason I'm asking is because I've used an Access database (an ODBC
connection) before and with a large amount of records in the table it can
take up to about 12 seconds for a page to load. Would using MySQL
dramatically speed this up anyway?

Large Tables & Performance In Mysql
I'm pretty new to mysql. I've got a table that's about 50 megs. I want each unique entry in a certain column in the table to result in a link on a page. is it okay to have it go through all 50 megs every time someone loads the page? that doesn't seem like it'd be very friendly for performance.

if I can't do that, how should it be done?

also, seperate question, if a table exists but doesn't have a primary key, is there any way to go back and add one (along with a key for each row)?

Performance Of Lots Of ECHO's V Jumping In/Out Of PHP
Suppose you have the situation where you have say 20 blocks of text (~250
chars each) in a MySQL db that you need to display, but each has a condition
to check to see whether you should display it or not.

As far as I can see, you have 2 options:

1. A continuous block of php, with all the text displayed via echo commands

2. Or jumping in and out of php for each block of text i.e.
<?php ...if condition ?>
pure html
<?php ...if end ?>

Which would be more performant? I understand that echo's are poor in
performance with large blocks of text, but what is the overhead of the web
server (Apache) making repeated calls to the php engine?

My general point is, is it "better" to echo html out (css, formatting and
all) or continuously jump in/out of php (and only echo MySQL data) if you
have a lot of php logic / control in your page?

Performance-define Vs. Global Vars
I'm interested to know which one is better--define or global variables
especially for config stuffs.
For example, osCommerce use something like: define('db_user', 'xx');
whereas phpMyAdmin uses like $config['server']['host'] =
'localhost'
and other few software use $db_pass = 'foo'

I'm much interested to know which one is good. Isn't hash array
like $config['server']['host']

Performance Project For The SigEx Foundry
have been testing performances of different scripting languages
fordatabase access, text processing and client application data
transfer. So far, I am getting better performance from PHP, but I
don't have any hard data to back it up compared to others.

This is a large project for the SigEx Foundry and it involves hundreds
of servers. I am looking for articles/studies/benchmarks on the
subject.

Is File_exists Expensive In Performance Terms?
I've written some template code and one thing I'm trying to protect
against is references to images that don't exist. Because users have
the ability to muck around with the templates after everything's been
set up, there is a chance they'll delete an image or ruin some tag
after the web designer has set up everything perfectly. I want the
software to catch mistakes like that and, at the very least, not show
broken links. On the control panel sometimes as many as 100 thumbnails
are run for each page, I'm wondering if running file_exists on all of
those slows things down at all?

Performance Considerations When Using Session Variables
I am writting an application, where data must be manipulated on one page, and then when the user/application is finished, post the data onto the next page of the application.

I'm considering putting the data (one large variable ~200k) into a session variable - but I am concerned about performance issues. What are the performance implications of using sessions for transporting large (or numerous) variables/arrays?

The other two models I'm considering are:

a) writing the data to a mysql db, and then accessing it on the next page.

b) writing the data into a hidden field in a second form on the the page (the first form is used for data manipulation), and posting it to the next page in the app.

What is the best (most efficient) way to tackle this?

File Vs. Fgets - Performance Question
I have a large file that I need to put into an array - but I only need the
last hundred or so lines. The file is approx. 1100 lines total (20k). Is
it more efficient to use fgets in a situation like this? I'm wondering if
it's quicker to read into the array only the lines I need (fgets), rather
than converting the whole file into an array (file). Or is file quicker
since I don't need fopen?

Arrays + Performance Surprise - Curious For Comments
A ng poster recently questioned their usage/creation of arrays and their
correct syntax. I got the idea to performance test from a recent
(excellent) PHP Tutorial article that was in Linux Format magazine (which
dealt with performance).

The original poster had a reply from someone who had said using
$testArray[$keyName] was better (and proper) than $testArray["$keyName"]

I *had* believed this to be correct... but... against my better judgement, I
decided to test the assumption.

I did a simple test to confirm - Basically, a loop that performed a
conditional 'if' test a large number of times - One used the double quotes
around the array key, one went without. Other than that, the rest was the
same - the box was almost asleep too during the test with a single user and
no cron jobs or other activity. To make sure, I ran the script twice, ten
minutes apart.... and the results?

Strangely, the test *with* the double quotes took half the time. We're
talking about Test 1 taking 85seconds and test 2 taking 152seconds

I'm curious on anything anyone can add to this - It got me thinking that if
something is faster, is it right/recommended practice?

My test script is below....

--
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing on usenet?

<?
// Perform a test $maxLoop number of times, count the number of seconds
// it takes to complete the loop - Test 1 has the array element named
// inside double quotes, Test 2 excludes the double quotes
set_time_limit(250);
$testArray=$_ENV;
$maxLoop=100000;
/////////////////////// Test 1 //////////////////// This took 85seconds to
complete
$start=time();
for($loopMany=0; $loopMany<$maxLoop; ++$loopMany)
{ foreach($testArray as $elementName=>$elementValue)
{ if($testArray["$elementName"]=="HOST")
{ $thisHost="$elementValue"; }
}
}
$end=time();
$difference=$end-$start;
print("<br>Duration 1: $difference<hr>");

set_time_limit(250);
$testArray=$_ENV;
$maxLoop=100000;
/////////////////////// Test 2 //////////////////// This took 151 seconds to
complete
for($loopMany=0; $loopMany<$maxLoop; ++$loopMany)
{ foreach($testArray as $elementName=>$elementValue)
{ if($testArray[$elementName]=="HOST")
{ $thisHost="$elementValue"; }
}
}
$end=time();
$difference=$end-$start;
print("<br>Duration 2: $difference<hr>");
?>

--
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing on usenet?

Popen - Command Line Vs. Web Server Performance
say i have the following two php scripts:

ptest.php:
<?
$p1 = popen("c:phpphp -q hello.php","r");
$p2 = popen("c:phpphp -q hello.php","r");
while (!feof($p1))
print fgets($p1);
while (!feof($p2))
print fgets($p2);
pclose($p1);
pclose($p2);
?>

and

hello.php:
<?
print "hello,
world!
";
?>

when i run ptest.php via the command line (ie. by typing in c:phpphp
ptest.php at the dos prompt) it runs instantly.

when i run ptest.php via a webserver, the resultant page not only
doesn't even load - it results in a bunch of errors (that appear as
dialogue boxes on the machine doing the hosting) effectively saying
that the command failed to execute properly and will now be shut down.
after clicking through all the errors, the systems performance is
noticebly affected (and in fact is bad enough such that i think a
reboot is justified).

Performance Issues Surrounding The Use Of Multiple Includes
can anyone tell me what the performance implications are of using
multiple includes on a page. do includes increase performance in
anyway? do they make a signifcantly negative impact? or is it negligible


Copyright © 2005-08 www.BigResource.com, All rights reserved