All Questions
- In Procedure parameter as IN, OUT & INOUT used but for a function always IN parameter works.
- A FUNCTION is always returns a value using the return statement. PROCEDURE may return one or more values through parameters or may not return at all.
- Functions are normally used for computations where as procedures are normally used for executing business logic.
- A Function returns 1 value only. Procedure can return multiple values (max 1024).
- Stored procedure returns always integer value by default zero. Whereas function returns type could be scalar or table or table values.
- Stored procedure is precompiled execution plan where as functions are not.
- A function can call directly by SQL statement like select func_name from dual while procedure cannot.
- Stored procedure has the security and reduces the network traffic and also we can call stored procedure in any no. of applications at a time.
- A Function can be used in the SQL Queries while a procedure cannot be used in SQL queries .that cause a major difference b/w function and procedures.
There are several differences between PHP4 and PHP5:
- Unified constructor and Destructor.
- Exception has been introduced.
- New error level named E_STRICT has been introduced.
- Now we can define full method definitions for a abstract class.
- Within a class we can define class constants.
- We can use the final keyword to indicate that a method cannot be overridden by a child.
- Public, private and protected method introduced.
- Magic methods has been included.
- We can pass value by reference
- PHP4 uses Zend engine 1.0 as a parser.PHP5 uses Zend engine 2.0
REQUIRE()
- The file should exist.Otherwise it will produce an Fatal error.the program cannot continue.
- Can call same file more than once.
REQUIRE_ONCE()
- Missing file throws Fatal Error and stops script.
- Cannot call same file more than once.
INCLUDE()
- Missing file throws Warning and keeps going.
- Can call same file more than once.
- The file is not mandatory.
- The program will run even if there is no such a file producing a warning.
INCLUDE_ONCE()
- Missing file throws Warning and keeps going.
- Cannot call same file more than once.
Some of the strengths are listed below :
- Energetic, Clever, Imaginative, Witty, Adaptable, Humanitarian, Resourceful, Loyal
- Inventive, Original, Accepting, Devoted, Independent, Compassionate
- Generous, Optimistic, Enthusiastic, Courageous, Dependable, Persistent
- Caring, Responsive, Confident, Ambitious, Encouraging, Analytical, Observant
- Helpful, Reliable, Precise, Diplomatic, Idealistic, Hospitable, Passionate, Responsible
There is slight difference between echo and print. But both are used to print line of code to the browser.
There are two main difference between echo and print:-
- echo does not return any value while print returns true or false on successful print.
- echo is faster than print.
- print can be used in expressions, where echo cannot.
ECHO :
- Language constuct and behaves like statement. It won't return value.
- echo takes multiple parameter seperated by commas.
- Faster than print.
PRINT:
- Language construct and behaves like function. It return true / false.
- print is part of precedence table.
- print take only one parameter.
- Echo works faster than print().
- Echo and print are language construct.
- Print behaves as a function and it returns an integer value.
- Echo does not returns any values.
- Echo is not suitable for conditional construct
- Print is suitable for conditional construct.
- Print process is slower than echo
Here are four basics type of run time error in php.
1. Notices: These are trivial, non-critical errors that PHP encounters while executing a script - for example, accessing a variable that has not yet been defined. By default, such errors are not displayed to the user at all - although you can change this default behavior.
2. Warnings: These are more serious errors - for example, attempting to include() a file which does not exist. By default, these errors are displayed to the user, but they do not result in script termination.
3. Fatal errors: These are critical errors - for example, instantiating an object of a non-existent class, or calling a non-existent function. These errors cause the immediate termination of the script, and PHP's default behavior is to display them to the user when they take place.
4. Parse Error: When we make mistake in PHP code like, missing semicolon or any unexpected symbol in code.
- Thank you, sir, for giving me the chance to introduce myself.
- Give a brief of your education background (up to plus two is fine, your family and location, any of your hobbies etc.
- If u have experience tell details about you experience in year & brief about employer & your role & responsibility.
- You can also mention one of your major achievements, if it fits the circumstance.
- That is my short introduction. Thank you, sir.
Keep the answer to just about 3-4 sentences and not more than that.
No need to explain your strengths & weakness at this points (as that will definitely come along). A common mistake seen is most HR interview is to start the sentence like "I am basically from..." No need to start a sentence like that. Keep the answer simple, to the point and give space and time for further questions. Do not stretch it too much.
MyISAM stores each table on disk with three files whose names begin with same as table name. These files have different extensions to differentiate their purpose. A .frm files stores the table format, and a .MYD (MYData) file stores the data of the table. If the table has indexes then these are stored in the .MYI (MYIndex) files.
Automicity - transactions are atomic and should be treated as one in case of rollback.
Consistency - the database should be in consistent state between multiple states in transaction.
Isolation - no other queries can access the data modified by a running transaction.
Durability - system crashes should not lose the data.
Advantages of InnoDB :-
- InnoDB should be used where data integrity comes a priority because it inherently takes care of them by the help of relationship constraints and transactions.
- Faster in write-intensive (inserts, updates) tables because it utilizes row-level locking and only hold up changes to the same row that’s being inserted or updated.
- Because InnoDB has to take care of the different relationships between tables, database administrator and scheme creators have to take more time in designing the data models which are more complex than those of MyISAM.
- Consumes more system resources such as RAM. As a matter of fact, it is recommended by many that InnoDB engine be turned off if there’s no substantial need for it after installation of MySQL.
Hot Questions
How to Get the Size of all Tables in a database in MySQL?