March 2008
Intermediate to advanced
458 pages
11h 25m
English
It’s common to assume that making multiple print calls to send data to the client is resource-intensive. Such an assumption is also logical. Sending data in small segments causes a scalability problem because of the overhead of generating the packets and headers for them. PHP with the default settings buffers print calls. Nothing is sent to the client until the entire page has been generated. Which is quicker, making many calls to the print function, or appending strings together and making fewer calls to print? Figure 1-7 illustrates the effect that both approaches can have. The generated page contains a table of three columns and 57 rows. Using the high print method in which each row is printed out ...
Read now
Unlock full access