Q1. What is mvc in PHP?
MVC is a design pattern for creating applications that separate Business logic (Controller) and Application data (Models) from the USER interface (View). MVC is an acronym of Model, View Controller.
Q2. Write a program to upload files using curl
Q3. What is name of max execution time constant in php?
max_execution_time is of the constant that is used to increase the execution time of a script in PHP.
Q4. What is difference between echo and print in PHP?
There are small difference between Echo and Print in PHP.
These are -
Q5. What is HTML DOM?
DOM (Document Object Model) is a Object Model for HTML. The Document Object Model (DOM) defines the logical structure of documents and the way a document is accessed and manipulated.
Q6. How to create cookies via Ajax in PHP?
Q7. What is sql injection? What you do to prevent SQL Injection in PHP?
The injection attacks that are used to possibly lead to the execution of an otherwise highly malicious SQL statement is known as SQL Injection.
The reports can control a database server behind a web application to cross its security measures. It can be used toad, modify and delete records in the application database. It can also be used to gain unauthorized access to your most sensitive data or information. These attacks are the most prevalent, oldest and very risky and dangerous web application vulnerabilities.
It can be prevented in PHP by using prepared statements and parameterized queries. These SQL statements are sent to and parsed by the application database server separately from any parameters.in this way, it makes it impossible for attackers to inject a malicious SQL INJECTION.
Q8. Explain scope levels in PHP.
There are 3 different levels of Scopes are available in PHP. They are.
Q9. Find the longest palindrome in a string
Q10. What is difference between session and cookie?
The Major difference between sessions and cookies are -
Q11. How to get IP address of user in PHP
In your code simply use
$_SERVER['REMOTE_ADDR'] to get the IP address of the client or User.
Q12. What is the full form of PHP?
The full form of PHP is Hypertext preprocessor (earlier called personal home page)
Q13. How to create object of Interface?
Q14. What is cross site scripting and how it can be prevented?
Q15. Write pyramid structure without using PHP function ?
Q16. What is difference between XAMPP, WAMP, and LAMP
Difference between XAMPP, WAMP, and LAMP
XAMPP is an open-source platform that is one of the simplest and light-weighted local servers useful to develop/test our website locally. XAMPP stands for cross-platform, Apache, MariaDB (MySQL), PHP and Perl. It can work with all major operating systems such as Windows, Mac, Linux, etc. We can perform testing and update the contents in our websites testing locally. It is open-source which can be easily downloaded and installed in our computer system.
WAMP uses the Apache webserver that is used to run a web server on windows. WAMP stands for Windows, Apache, MySQL, and PHP. It works on only the windows operating system. It uses the MySQL relational database management system and PHP object-oriented scripting language, which helps to test the web pages without publishing it on the live web server.
LAMP platform has four layers, also known as a LAMP stack. LAMP stands for Linux, Apache, Mysql, and PHP. It works on the Linux operating system. It is easy to code with PHP and a cheap and ubiquitous hosting platform. It can generate dynamic web pages that run PHP code and load data from a MySQL database.
Q17. Tell me few diffrence between GET & POST
Few difference between GET & POST is -
GET request remains in browser history while POST Request does not remain in browser history.
GET is availbale for retrieving data while POST is available for writing/Updating data.
GET have no side effects while POST have some side effects.
Q18. How to connect MongoDB using PHP?
Q19. What is default session time in PHP? How to increase It?
Q20. How can you connect a web page data with mysql ?
Q21. Explian the difference between preg_Match and preg_replace?
preg_Match is the pattern, that is used for searching as a string, while preg_replace is the pattern, that contains the string which is used to search the content, which can be the array of string.
Q22. List the HTTP methods avalable in PHP?
Q23. What is Interface? Why we use it?
In the concept of object-oriented programming, Interfaces are used for the implementation of multiple inheritances. In simple words, it means it is a point or a place where two systems, organizations, subjects etc. meet and interact with each other. It is advantageous to increase the readability of the codes . It helps to decrease class LOC. Here, we just declare the procedure or methods and does not provide any implementation for the same. They are more flexible than Classes. They are helpful when we can’t use class inheritance. For the achievement of total abstraction, we need interfaces. Loose coupling is also achieved through it. It gives us more capability to extend and maintain our applications, utilization of abstraction and implementing good software development practices.
Q24. What is difference between PHP 4, 5 and 7?
Difference between PHP4, PHP5, and PHP7
Q25. What is difference between the include(), require(),require_once() functions in PHP?
Q26. What are design patterns in PHP? Can you list few.
Q27. What are Super Global variables in PHP?
Q28. What is Php ini?
Q29. Code to send a mail with attachment using phpmailer?
Q30. What is difference between CURL and AJAX?
Difference between CURL and AJAX
Q31. How to set and Get a value in PHP Session.
Q32. What is the usage of link() in PHP?
PHP link() function is used to hard link for a specified target. The link function takes two arguments first is the target file and the second argument is the name of the link.
Note: The link() function does not work remotely.
<?php $target = "abc.php"; $linkname = "name of link"; link($target, $linkname); ?>
Q33. PHP resembles syntax from which programming Lanaguage?
PHP resembles its syntax from C and Perl Programming Language.
Q34. What is the default session path in PHP?
The default PHP session storage path on the server is /tmp directory.