PHP is the most widely used open-source programming language that is created specifically for developing dynamic websites and mobile APIs. PHP is the most demanded programming skills in various companies at present. Also, PHP developers have a great demand at present. Most of the companies are looking for Developers with PHP skills on their resume. If you are planning to begin a career in PHP then, you can start your career now in PHP as it is the right time to begin.
To qualify oneself to the position of PHP Developer in an Interview, one should be well-prepared for the questions that are asked to them in an Interview. Given below are the 101 PHP and MySQL Interview Questions and answers for freshers and Experienced. As MySQL is the database for PHP we have enlisted a few questions that are related to MySQL.
- Explain Echo?
- What is the name of the Script Engine in PHP?
- What is the trim() function?
- What ways can we retrieve data? On the result sets of MySql using PHP?
- mysql_fetch_row
- mysql_fetch_assoc
- mysql_fetch_array
- mysql_fetch_object
- What is the limitation of print?
- What is an in_array() function?
- What are the uses of count() function in PHP?
- How can we include the file to the PHP page?
- How do you create a Database using MySQL and PHP?
- List three features of MySQL?
- What is the Language MySQL is been written with?
- MySQL – C, C++
- SQL parser – Yacc.
- Mention technical specifications of MySQL?
- Drivers
- JSON Support
- Graphical Tools
- Flexible structure
- High performance
- Geo-Spatial Support
- OLTP and Transactions
- MySQL Enterprise Monitor
- MySQL Enterprise Security
- Manageable and easy to use
- Replication & High-Availability
- Manageability and Ease of Use
- Replication and high availability
- Security and storage management
- What are the Data Types in PHP?
- Array
- Object
- Callable
- Float
- String
- Integer
- Boolean
- Null
- Resource
- Mention the frameworks in PHP?
- Yii 2
- Symfony
- CakePHP
- CodeIgniter
- Zend Framework
- What is unset() ?
- What are the three main error types?
- Fatal
- E-Notices
- E-Warnings
- How will you get an IP address for a client?
- What is the explode function?
- How do you stop the execution of the PHP Script?
- Define the Implode function.
- What are the Consonants in PHP?
- Mention the table name that is present in MySQL?
- ISAM
- Heap
- Merge
- MyISAM
- INNO DB
- What are the uses of PHP?
- It can gather the data from files, save those data to a file and also we can send those data through email.
- One could delete, add, and modify elements within the database by using PHP.
- We can access the cookies variables.
- List the pro features of PHP MySQL?
- Data Security
- On-Demand Scalability
- High Performance
- Round-the-clock
- Complete Workflow Control
- Flexibility on Open Source
- Comprehensive Transactional Support
- Define PHP 5?
- Define Static Websites.
- What are Dynamic Websites?
- What are the Magic Functions that are available in the PHP?
- How do you stop executing a PHP Script?
- What is an isset () function?
- What is the way to destroy the variable or object?
- What is the MIME types is required for sending the attachment mail?
- What are the various types of triggers that are possible in MySQL?
- Before Insert
- After Insert
- Before Delete
- After Delete
- Before Update
- After Update
- What is the session time of PHP?
- Mention the uses of PHP and MySQL?
- What is a TEXT and Blob in MySQL?
- What are the types of Blob?
- BLOB
- TINYBLOB
- LONGBLOB
- MEDIUMBLOB
- What are the types of TEXT in MySQL?
- TEXT
- TINY TEXT
- MEDIUM TEXT
- LONGTEXT
- Name the variable’s scope in PHP?
- Local Scope
- Global Scope
- Static Scope
- How would you redirect the page in PHP?
- List any three Disadvantages of MySQL?
- They are not sufficient for large scale databases.
- MySQL cannot support STORED PROCEDURES and COMMIT function version which is lesser than 5.0.
- The functionality of MySQL is primarily dependent on the addons.
- How to destroy a cookie?
- What are the possible ways to pass the variable via navigation between pages?
-
- GET/QueryString
- POST
- What is the one main distinction between PHP4 and PHP5
- What is the function used in removing the escape characters from the string?
- What are the functions used in sorting the Array?
- Sort()
- asort()
- arsort()
- ksort()
- rsort()
- usort()
- natsort()
- natcasesort()
- uksort()
- array_multisort()
- Which method is used in sending the Simple Mail Transfer Protocol using PHP?
- From the statements that are given below which one is correct?
- empty($x) return TRUE
- isset($x) return FALSE
- is_null($x) return FALSE
- What is the immediate way to escape the incoming data?
- Mention the method that is used in tweaking a object’s cloning behavior?
- How can you get the recent date of MySQL?
- What is the default port number of MySQL?
- Name the tools through which we could draw E- diagrams for MySQL.
- Case Studio
- Smart Draw
- List a few functions of the Imap?
- imap_body – Reads the body message
- imap_check – Checks the current mailbox
- imap_delete – Marks the message for deletion from the present mailbox
- imap_mail – Sends an email as a message.
- What are the current versions of MySQL and PHP?
- MySQL – 5.0
- PHP – 5.1 Beta
- What are the types of Array in PHP?
- Indexed Array
- Associative Array
- Multi-Dimensional Array
- What are the built-in functions that will add value to the end of an array?
- into_array()
- inend_array()
- array_push()
- array_unshift()
- What are the features of PHP7?
- Spaceship operator
- Generator delegation
- Anonymous classes
- Closure:: call method
- Group use declaration
- Scalar type declarations
- Return type declarations
- Null coalescing operator (??)
- Constant arrays using define()
- Generator return expressions.
- List the Content Management Systems in PHP?
- WordPress
- Joomla
- Magento
- Drupal
- How many columns we can create for the index?
- How can you check whether the value of the given variable is number or not?
- What function can be used in determining whether a file exists?
- feof()
- is_readable()
- file_exists()
- is_file_exists()
- Which of the following is not a valid Simple XML Parser method?
- simplexml_import_dom()
- simplexml_import_sax()
- simplexml_load_file()
- simplexml_load_string()
- How objects are passed either by reference or value?
- How to pass variable by value?
- What is the query for displaying the top 20 rows?
- Define the Associative Array.
- From the below statements which of the following would produce the value of “83” as their output?
- echo intval(“0123”, 8);
- echo intval(“0123”);
- echo (int) 083
- Define Multidimensional Array.
- Elucidate SQL Injection?
- From the below cURL which of them is not a valid parameter PHP?
- CURLOPT_RETURNTRANSFER
- CURLOPT_GET
- CURLOPT_POST
- Name the functions that are used for searching the strings using the POSIX-style regular expression?
- sql_regcase()
- eragi_replace()
- ereg_replace()
- spliti()
- erag()
- How can we sort array in the reverse order?
- What is the role of MySQL check?
- What is TimeStamp?
- Mention the advantages of the InnoDB over MyISAM?
- The Advantages include,
- Transactions
- Row-level locking
- Crash Recovery
- Foreign key Constraints.
- Which one is not a valid method in PHP XML DOM?
- geElementByName()
- removeChild()
- geElementById()
- appendChild()
- What is the role of a LAMP in PHP?
- What is the meaning of Self in PHP?
- Explain MySQL dump?
- What is the Scope level in PHP?
- Private
- Public
- Protected
- What is the limit of the identifiers in MySQL?
- Table 64bytes
- Index 64 bytes
- Column 64 bytes
- Database 64 bytes
- Alias 255 bytes
- How can we identify the current session ID?
- Can PHP support different inheritances?
- What are the various types of operators available in PHP?
- Union
- Union All
- Minus
- Intersect
- Explain White Box Testing?
- Elucidate CTE?
- List the encryption functions that are available in PHP?
- crypt()
- Mcrypt()
- hash()
- What are the various types of print functions that are available in PHP?
- print() Function
- printf() Function
- echo() Function
- print_r() Function
- sprintf() Function
- Explain Composer in PHP?
- What is an action attribute in the HTML form?
- How would you protect the special characters in the query string?
- What is Exception::getmessage?
- How would you remove the white-space from the start till the end of the $string variable?
- Mention the default time session in PHP?
- Differentiate between PHP and Java
Criterion | PHP | Java |
Deployment area | Server-Side Scripting language | General Purpose Programming language |
Supports Rich APIs | No | Yes |
Language Type | Dynamically typed | Statically typed. |
- Differentiate between HTML and PHP?
- Elucidate polymorphism in PHP?
- Mention the use of die in PHP?
- Write the syntax of the mail() function in PHP?
- List the general MYSQL functions?
- NOWO
- CURRDATEO
- CONCAT (X, Y)
- DATEDIFF (X, Y)
In the coming days, we would add the number of Interview Questions to this blog. For more details regarding PHP and MySQL refer to our website.
We provide training for PHP Training in Chennai at FITA provides professional training to the students with certification. We also have various branches across Chennai.