|
INTERVIEW QUESTIONS
PROGRAMMING LANGUAGES
PHP
DETAILS
Question: What do you need to do to improve the performance (speedy execution) for the script you have written?
Answer: There are many things to be considered. If your application based on Database, you should think about re-factoring queries try to use high performance queries (Use EXPLAIN to monitor the amount of records retrieved for each query. You can use UNIQUE, LIMIT, WHERE to filter the no of records returned).And also you should be aware of fine tuning configuration for your needs. In PHP you should use native functions instead of aliases. And also you should choose best function for the job. If you are going to do simple string replace use str_replace than ereg_replace. Use is_int() instead of is_integer().Use DBG or xdebug to profile your scripts, find the bottle neck function and try to re factor if possible.
|
|
|
Category |
PHP Interview Questions & Answers -
Exam Mode /
Learning Mode
|
Rating |
(0.3) By 8201 users |
Added on |
8/25/2014 |
Views |
70534 |
Rate it! |
|
|
Question:
What do you need to do to improve the performance (speedy execution) for the script you have written?
Answer:
There are many things to be considered. If your application based on Database, you should think about re-factoring queries try to use high performance queries (Use EXPLAIN to monitor the amount of records retrieved for each query. You can use UNIQUE, LIMIT, WHERE to filter the no of records returned).And also you should be aware of fine tuning configuration for your needs. In PHP you should use native functions instead of aliases. And also you should choose best function for the job. If you are going to do simple string replace use str_replace than ereg_replace. Use is_int() instead of is_integer().Use DBG or xdebug to profile your scripts, find the bottle neck function and try to re factor if possible. Source: CoolInterview.com
If you have the better answer, then send it to us. We will display your answer after the approval.
Rules to Post Answers in CoolInterview.com:-
- There should not be any Spelling Mistakes.
- There should not be any Gramatical Errors.
- Answers must not contain any bad words.
- Answers should not be the repeat of same answer, already approved.
- Answer should be complete in itself.
|
|
Related Questions |
View Answer |
|
How do you capture audio/video in PHP?
|
View Answer
|
|
difference between require() and include()
|
View Answer
|
|
How to handle drop down box change event without refreshing page?
|
View Answer
|
|
What is the difference between Split and Explode
|
View Answer
|
|
What is the effect of large number of data stored in a database on a website ?
|
View Answer
|
|
How would you initialize your strings with single quotes or double quotes?
|
View Answer
|
|
Is Inheritance supported in PHP?
|
View Answer
|
|
What is the diffrence between Notify URL and Return URL?
|
View Answer
|
|
How to get the URL domain name in PHP?
|
View Answer
|
|
What is the use of obj_start()?
|
View Answer
|
|
What would be the differences between PHP and Java?
|
View Answer
|
|
What is htaccess?
|
View Answer
|
|
How do you create subdomains using PHP?
|
View Answer
|
|
What is the use of header() function in php?
|
View Answer
|
|
Where does the PHP session stored, either client side or server side?
|
View Answer
|
|
What is the difference between session_register and $_session?
|
View Answer
|
|
What is the use of sprintf() function?
|
View Answer
|
|
Difference between mysql_connect and mysql_pconnect.
|
View Answer
|
|
How do download in php ?
|
View Answer
|
|
How can I maintain the count of how many persons have hit my site?
|
View Answer
|