PHP Interview Quesition & Answer 3

31.What are the different types of statements that are present in PHP?

There are four kinds of PHP statements that are present. They are as follows:
• Simple statement- these are the echo statements and end with a semicolon (;). PHP ignores white spaces between simple statements. Until it finds a semicolon it reads the statement.
• Complex/Conditional statements: these are the statements which deal with certain conditions that have to be executed to meet certain specific requirements. These are if and else block or switch statements. PHP reads the complete statement and doesn’t stop at the first semicolon it encounters. It looks for starting and ending braces to end the execution.
• Looping statements: statements that are repeated in a block. The feature that enables you to execute the statements repeatedly is called as loop. For example: for loop, while loop, do..while loop.

32.What is the use of $_Server and $_Env?

$_SERVER and $_ENV arrays contain different information. The information depends on the server and operating system being used. Most of the information can be seen of an array for a particular server and operating system. The syntax is as follows:
foreach($_SERVER as $key =>$value)
{ echo “Key=$key, Value=$value\n”; }

33.What are the disadvantages of MySQL?

MySQL does not support a very large database size as efficiently
MySQL does not support ROLE, COMMIT, and Stored procedures in versions less than 5.0
Transactions are not handled very efficiently.

34.What are the disadvantages of MySQL?

MySQL does not support a very large database size as efficiently
MySQL does not support ROLE, COMMIT, and Stored procedures in versions less than 5.0
Transactions are not handled very efficiently.

35.Explain about MySQL and its features.

MySQL is a relational database management system which is an open source database.

Because of its unique storage engine architecture MySQL performance is very high.
Supports large number of embedded applications which makes MySql very flexible.
Use of Triggers, Stored procedures and views which allows the developer to give a higher productivity.
Allows transactions to be rolled back, commit and crash recovery.

36.What are MyISAM tables?

In MySQL MyISAM is the default storage engine. MyISAM tables store data values with the low byte first. Even though MyISAM tables are very reliable, corrupted tables can be expected if there is a hardware failure, the pc shuts down unexpectedly. MyISAM tables are reliable because any change made to a table is written before the sql statement returns. Even though MyISAM is the default storage engine it is advisable to specify ENGINE= MYISAM

0