• +91 9971497814
  • info@interviewmaterial.com

Computer Interview Questions Answers

PHP Interview Questions Answers

Question - 81 : - What’s the output of the ucwords function in this example?

Answer - 81 : - $formatted = ucwords("TECHPREPARATIONS IS COLLECTION OF INTERVIEW QUESTIONS"); print $formatted; What will be printed is TECHPREPARATIONS IS COLLECTION OF INTERVIEW QUESTIONS. ucwords() makes every first letter of every word capital, but it does not lower-case anything else. To avoid this, and get a properly formatted string, it’s worth using strtolower() first.

Question - 82 : - Give the syntax of GRANT commands?

Answer - 82 : - The generic syntax for GRANT is as following GRANT [rights] on [database] TO [username@hostname] IDENTIFIED BY [password] Now rights can be: a) ALL privilages b) Combination of CREATE, DROP, SELECT, INSERT, UPDATE and DELETE etc.

Question - 83 : - How can we get second of the current time using date function?

Answer - 83 : - $second = date("s");

Question - 84 : - Can we use include ("abc.php") two times in a php page "makeit.php"?

Answer - 84 : - Yes.

Question - 85 : - Explain normalization concept?

Answer - 85 : - The normalization process involves getting our data to conform to three progressive normal forms, and a higher level of normalization cannot be achieved until the previous levels have been achieved (there are actually five normal forms, but the last two are mainly academic and will not be discussed). First Normal Form The First Normal Form (or 1NF) involves removal of redundant data from horizontal rows. We want to ensure that there is no duplication of data in a given row, and that every column stores the least amount of information possible (making the field atomic). Second Normal Form Where the First Normal Form deals with redundancy of data across a horizontal row, Second Normal Form (or 2NF) deals with redundancy of data in vertical columns. As stated earlier, the normal forms are progressive, so to achieve Second Normal Form, your tables must already be in First Normal Form. Third Normal Form I have a confession to make; I do not often use Third Normal Form. In Third Normal Form we are looking for data in our tables that is not fully dependant on the primary key, but dependant on another value in the table

Question - 86 : - What is meant by nl2br()?

Answer - 86 : - nl2br() inserts a HTML tag <br> before all new line characters \n in a string. echo nl2br("god bless \n you"); output: god bless<br> you

Question - 87 : - What is the difference between PHP4 and PHP5?

Answer - 87 : - PHP4 cannot support oops concepts and Zend engine 1 is used. PHP5 supports oops concepts and Zend engine 2 is used. Error supporting is increased in PHP5. XML and SQLLite will is increased in PHP5.

Question - 88 : - What's PHP ?

Answer - 88 : - The PHP Hypertext Preprocessor is a programming language that allows web developers to create dynamic content that interacts with databases. PHP is basically used for developing web based software applications.

Question - 89 : - What are the differences between DROP a table and TRUNCATE a table?

Answer - 89 : - DROP TABLE table_name - This will delete the table and its data. TRUNCATE TABLE table_name - This will delete the data of the table, but not the table definition.

Question - 90 : - What is the maximum size of a file that can be uploaded using PHP and how can we change this?

Answer - 90 : - You can change maximum size of a file set upload_max_filesize variable in php.ini file

Computer Contributors

Rajeev Katiyar
Yes Baroda

Share your email for latest updates


Our partners