User login

RobLoach

Use echo instead of print in themes for speed?

Hat tip to RobLoach who noted this in the #drupal IRC channel-- if we want to squeeze hundredths of a millisecond more out of our Drupal modules and themes, we should use echo instead of print for getting the data to the screen.

UPDATE: The PHP developers don't recommend switching from print to echo for speed reasons, suggesting that the difference can be dependent on the setup of your environment.

Random more useful PHP code speed improvements:

Syndicate content