PHP Interview Questions
There is given PHP interview questions and answers that have been asked in many companies. Let's see the list of top PHP interview questions.
What is MySQL?
MySQL is an open-source DBMS which is developed and distributed by Oracle Corporation.
It is supported by most of the popular operating systems, such as Windows, Linux, etc. It can be used to develop different types of applications but it is mainly used for developing web applications.
.What is the Scope level in PHP?
- Private
- Public
- Protected
What is the role of a LAMP in PHP?
It is the combination of Linux, Apache, PHP, and MySQL.
.What function can be used in determining whether a file exists?
- feof()
- is_readable()
- file_exists()
- is_file_exists()
List the Content Management Systems in PHP?
- WordPress
- Joomla
- Magento
- Drupal
What is the session time of PHP?
It will last for 24 minutes(1440 seconds).
.What is the MIME types is required for sending the attachment mail?
Multipart/ mixed.
.What is stdClass in PHP?
It is PHP generic empty class.
stdClass is used to create the new Object.
Example
$newObj = new stdClass(); $newObj->name = 'What is your name?' ; $newObj->description = 'Tell me about yourself?' ; $newObj->areYouInIndia = 1 ; print_r($newObj);
OUTPUT :
.stdClass Object ( [name] => What is your name? [description] => Tell me about yourself? [areYouInIndia] => 1 )
What are the new features introduced in PHP7?
- Zend Engine 3 performance improvements and 64-bit integer support on Windows
- Uniform variable syntax
- AST-based compilation process
- Added Closure::call()
- Bitwise shift consistency across platforms
- (Null coalesce) operator
- Unicode codepoint escape syntax
- Return type declarations
- Scalar type (integer, float, string, and Boolean) declarations
What is Zend Engine?
Zend Engine is used internally by PHP as a compiler and runtime engine. PHP Scripts are loaded into memory and compiled into Zend OPCodes.
These OPCodes are executed and the HTML generated is sent to the client.
The Zend Engine provides memory and resource management and other standard services for the PHP language. Its performance, reliability, and extensibility have played a significant role in PHP’s increasing popularity.
.