Interview Que

Que 1. What is PHP ?

Ans 1. PHP is a server side scripting language . Mainly used for Creating Dynamic web Pages and User Interactive Web applications . PHP uses  frameworks and cms for creating websites . Even PHP alone(CORE PHP) can be used for same purpose but its lack standardization . Even a non technical person can build  websites using its CMS. WordPress is  the widely famous   CMS of php. It is also an object oriented programming language like java, C# etc. It is very easy for learning .


Que 2. Who is the Founder Of PHP ?

Ans 2. The Founder of PHP is "RASMUS LERDOLF" .


Que 3. Difference between Echo and Print Statement ?

Ans 3. Echo don't have a Return Type But Print statement have Return Type . Moreever Echo is faster than Print statement .

Que 4.  What is the difference between $$name and $name ?

Ans 4. $$name is reference Variable while $name is a variable . eg $name= "Iram"; and $$name="Zoha" than its mean $Iram="Zoha" .


Que 5. What's the difference between require and include?

Ans 5. If the file is not found by require() will cause a fatal error and halt the execution of the script while using ' include()'  a warning will be issued  but execution will continue.

Que 6. How to Submit Form without Submit Button ?

Ans 5. This can be easily done using javascript function submit()  . just Onclick call the 'document.form_name.submit();' in the script Tags .


Que 7.  Difference between GET and POST ?

Ans 7.  Using GET will revel the data in the URL while the data send using POST is Hidden . Moreover GET statement is faster than POST .


Que 8. How can you extract dophptalks.in from https://info@dophptalks..in ?

Ans 8. This can be easily done using the function substr(); eg echo substr('https://info@dophptalks..in','@','false');
if we change the value false to true than the first segment beyond the string will be displayed .

another way 

preg_match(“/^http:\/\/.+@(.+)$/”,”http://info@dophptalks.in”,$matches);
echo $matches[1];








 

Que 9. What are the different tables(Engine) present in MySQL, which one is default?


Ans 9.  Following tables (Storage Engine) we can create
1. MyISAM(The default storage engine IN MYSQL Each MyISAM table is stored on disk in three files. The files have names that begin with the table name and have an extension to indicate the file type. An .frm file stores the table format. The data file has an .MYD (MYData) extension. The index file has an .MYI (MYIndex) extension. )


2. InnoDB(InnoDB is a transaction-safe (ACID compliant) storage engine for MySQL that has commit, rollback, and crash-recovery capabilities to protect user data.)
 

3. Merge
 

4. Heap (MEMORY)(The MEMORY storage engine creates tables with contents that are stored in memory. Formerly, these were known as HEAP tables. MEMORY is the preferred term, although HEAP remains supported for backward compatibility. )
 

5. BDB (BerkeleyDB)(Sleepycat Software has provided MySQL with the Berkeley DB transactional storage engine. This storage engine typically is called BDB for short. BDB tables may have a greater chance of surviving crashes and are also capable of COMMIT and ROLLBACK operations on transactions)
 

6. EXAMPLE
 

7. FEDERATED (It is a storage engine that accesses data in tables of remote databases rather than in local tables. )
 

8. ARCHIVE (The ARCHIVE storage engine is used for storing large amounts of data without indexes in a very small footprint. )
 

9. CSV (The CSV storage engine stores data in text files using comma-separated values format.)
 

10. BLACKHOLE (The BLACKHOLE storage engine acts as a “black hole” that accepts data but throws it away and does not store it. Retrievals always return an empty result)
 

Que 10. What is the use of   htaccess ?  Where and Why do we use this ?

Ans 10. .htaccess files is the configuration files for Apache Server which help to provide a way to make configuration changes on a per-directory basis . A file  containing one or more configuration directives is placed in a particular document directory and the directives apply to that directory, and all sub directories thereof . 



No comments:

Post a Comment