Skip to content

Technology Forum

SEO, Speed Up website, Server Optimization, Linux, Open Source Softwares

  • Home
  • General
    • Web Server
    • Website Formatting
  • IT Companies
  • Optimization
    • PHP
  • Linux
Optimization
Check PageSpeed
Servers
SMTP reply codes
General
Overview of SSL Certificates
PHP
Resolving Public DNS Server List
MySQL
Calculate Query Cache
PHP
Encrypt and Decrypt for URL Using PHP

PHP Code Optimization

Posted on May 5, 2007February 15, 2023 By infoweb No Comments on PHP Code Optimization
Optimization, PHP

I have found the post by Reinhold Webber, which provide good techniques and methods for PHP performance and optimization. I have tried to add more explanation to the points posted by Reinhold Webber.

    1. If a method can be static, declare it static. Speed improvement is by a factor of 4.
    2. echo is faster than print and print_r.
    3. Use echo’s multiple parameters instead of string concatenation.
    4. Set the maxvalue for your for-loops before and not in the loop.
    5. Unset your variables to free memory, especially large arrays.
    6. Avoid magic like __get, __set, __autoload.

      Read More “PHP Code Optimization” »

Posts navigation

Previous 1 … 9 10

View Posts

  • HTML: Link rel – Preload
  • HTML: Attributes of rel
  • Linux Commands
  • Security HTTP Headers
  • WCAG 2.0 checklist

Categories

  • Domain Name
  • General
    • Servers
    • Web Server
    • Website Formatting
  • IT Companies
  • Linux
  • MySQL
  • Optimization
    • PHP
  • Troubleshooting
  • Web Hosting Control Panel
    • Plesk Panel
  • Websites
    • CSS
    • HTML
    • Optimization
  • Windows
    • Windows 10

Recent Posts

  • HTML: Link rel – Preload
  • HTML: Attributes of rel
  • Linux Commands
  • Security HTTP Headers
  • WCAG 2.0 checklist

Copyright © 2023 Technology Forum.