Archive | PHP RSS feed for this section

5 February 2011 0 Comments

[PHP] Setup Multiple Virtual Hosts in WAMP/XAMPP

[PHP] Setup Multiple Virtual Hosts in WAMP/XAMPP

WAMP and XAMPP are the popular server for developing web application with PHP/MYSQL in Windows environment. Generally we are working with different projects of clients. All projects folder exists in root directory of WAMP/XAMPP. Now whenever we move the project to production environment, we have to change tje absolute path manually.You have an option of Virtual Host if you dont want to change it manually.

4 February 2011 0 Comments

[PHP] Optimize PHP code basic tips

[PHP] Optimize PHP code basic tips

As i mention in my echo vs print article, there are few basic tips to write a optimize PHP code. You are aware with echo and print that echo is faster so always prefer to use echo rather than use print. Now you use single quote as well as double quote to output simple string using echo statement. Single quote is faster than double quote, use comma instead of dot in echo..

4 February 2011 0 Comments

[PHP] Optimize code-echo vs print functions

php

echo and print both are language constructs and both have the same functionality for output purpose. But if you look at the performance than echo is faster than print. Reason is simple as you may be aware that print will output the string on screen as well as it will return the status while echo will just output the string and finish the task. So print will take some more time than echo. prefer to use echo to write optimize PHP Code.