<a href="https://www.mytectra.com/interview-question/human-resourse-hr-interview-questions/">Human Resource (HR) Interview Questions</a> <a href="https://www.mytectra.com/interview-question/selenium-interview-questions-and-answers/">Selenium Interview Questions and Answers</a> <a href="https://www.mytectra.com/interview-question/javascript-interview-questions/">Javascript Interview Questions</a>
PHP Interview Questions and Answers for Freshers 2018
- Get link
- X
- Other Apps
Q1. What is PHP?
PHP is server side scripting language. It is the most widely used web technology to create dynamic web pages. There are many PHP based frameworks and Open sources available for free to use. Some examples include WordPress, Drupal, Laravel etc. We can embed PHP with HTML and can further write server-side code with PHP for web development.
PHP is server side scripting language. It is the most widely used web technology to create dynamic web pages. There are many PHP based frameworks and Open sources available for free to use. Some examples include WordPress, Drupal, Laravel etc. We can embed PHP with HTML and can further write server-side code with PHP for web development.
Q2. Which is the latest version of PHP?
Stable release: 7.1.4 / 13 Apr 2017; http://php.net/downloads.php
Stable release: 7.1.4 / 13 Apr 2017; http://php.net/downloads.php
Q3. What are the extensions of PHP File?
.php, .phtml, .php3, .php4, .php5, .php7, .phps .
.php, .phtml, .php3, .php4, .php5, .php7, .phps .
Q4. What is the difference between include(), include_once() and require_once()
The include() statement includes and evaluates a specified line i.e. it will include a file based in the given path. require() does the same thing expect upon failure it will generate a fatal error and halt the script whereas include() will just gives a warning and allow script to continue. require_once() will check if the file already has been included and if so it will not include the file again.
The include() statement includes and evaluates a specified line i.e. it will include a file based in the given path. require() does the same thing expect upon failure it will generate a fatal error and halt the script whereas include() will just gives a warning and allow script to continue. require_once() will check if the file already has been included and if so it will not include the file again.
Q5. Differences between GET, POST and REQUEST methods ?
GET and POST are used to send information from client browser to web server. In case of GET the information is send via GET method in name/value pair and is URL encoded. The default GET has a limit of 512 characters. The POST method transfers the information via HTTP Headers. The POST method does not have any restriction in data size to be sent. POST is used for sending data securely and ASCII and binary type’s data. The $_REQUEST contains the content of both $_GET, $_POST and $_COOKIE.
GET and POST are used to send information from client browser to web server. In case of GET the information is send via GET method in name/value pair and is URL encoded. The default GET has a limit of 512 characters. The POST method transfers the information via HTTP Headers. The POST method does not have any restriction in data size to be sent. POST is used for sending data securely and ASCII and binary type’s data. The $_REQUEST contains the content of both $_GET, $_POST and $_COOKIE.
Q6. Explain how PHP sends output to Browser? OR How a file is processed when it sends output to browser ?
1. Open website http://www.tutorialmines.net
2. Request send to server of http://www.tutorialmines.net
3. Call PHP Files.
4. PHP Scripts are loaded into memory and compiled into Zend opcode.
5. These opcodes are executed and the HTML generated.
6. Same HTML is send back to Browser.
1. Open website http://www.tutorialmines.net
2. Request send to server of http://www.tutorialmines.net
3. Call PHP Files.
4. PHP Scripts are loaded into memory and compiled into Zend opcode.
5. These opcodes are executed and the HTML generated.
6. Same HTML is send back to Browser.
Q7. What are the different errors in PHP?
There are 4 basically types of error.
Parse Error – Commonly caused due to syntax mistakes in codes e.g. missing semicolon, mismatch brackets.
Fatal Error – These are basically run time errors which are caused when you try to access what can’t be done. E.g. accessing a dead object, or trying to use a function that hasn’t been declared.
Warning Error – These occurs when u try to include a file that is not present, or delete a file that is not on the server. This will not halt the script; it will give the notice and continue with the next line of the script.
Notice Error – These errors occurs when u try to use a variable that hasn’t been declared, this will not halt the script, It will give the notice and continue with the next line of the script.
There are 4 basically types of error.
Parse Error – Commonly caused due to syntax mistakes in codes e.g. missing semicolon, mismatch brackets.
Fatal Error – These are basically run time errors which are caused when you try to access what can’t be done. E.g. accessing a dead object, or trying to use a function that hasn’t been declared.
Warning Error – These occurs when u try to include a file that is not present, or delete a file that is not on the server. This will not halt the script; it will give the notice and continue with the next line of the script.
Notice Error – These errors occurs when u try to use a variable that hasn’t been declared, this will not halt the script, It will give the notice and continue with the next line of the script.
Q8. What are the various methods/ways to pass data from one web page to another web page?
The different ways to pass the data as follows:
1. Session
2. Cookie
3. Database
4. URL parameters
The different ways to pass the data as follows:
1. Session
2. Cookie
3. Database
4. URL parameters
Q9. What is session and why do we use it?
Session is a super global variable that preserve data across subsequent pages. Session uniquely defines each user with a session ID, so it helps making customized web application where user tracking is needed.
Session is a super global variable that preserve data across subsequent pages. Session uniquely defines each user with a session ID, so it helps making customized web application where user tracking is needed.
Q10. What is cookie and why do we use it?
Cookie is a small piece of information stored in client browser. It is a technique used to identify a user using the information stored in their browser (if already visited that website) . Using PHP we can both set and get COOKIE.
Cookie is a small piece of information stored in client browser. It is a technique used to identify a user using the information stored in their browser (if already visited that website) . Using PHP we can both set and get COOKIE.
- Get link
- X
- Other Apps
Popular posts from this blog
What is the Best way to learn Python in 2017?
W hat is the best way to learn Python? This is the question many people ask me when they meet us to discuss on Python courses offered by myTectra . Python is a general-purpose interpreted, interactive, object-oriented and high-level programming language. Currently Python is the most popular Language in IT. Python adopted as a language of choice for almost all the domain in IT including Web Development, Cloud Computing (AWS, OpenStack, VMware, Google Cloud, etc.. ), Infrastructure Automation , Software Testing, Mobile Testing, Big Data and Hadoop, Data Science, etc. It’s no secret that Python is one of the most commonly used programming languages.For the past five years, Python has held the number one position as the“most popularcoding language.” Python is a favorite among many developers for its strong emphasis on readability and efficiency,especially when compared to other languages like Java, PHP, or C++. If you’re like many people who fir...
6 Reasons to learn AngularJS
Angular 2 was released in late 2016 and brought Angular into the modern web with its desktop and mobile applications. If you build Web applications, chances are you’ve heard of Angular, the popular JavaScript framework for building full-featured, client-side, browser-based applications. The recent release of Angular 2 (September 2016) brought Angular into the modern Web and expanded its reach into mobile and desktop applications. So what’s all of the Angular 2 excitement about? How is it different from every other JavaScript framework out there? Is it worth learning? What’s there to love? Here are six reasons to love Angular 2. 1. Enhanced developer productivity with Angular 2 The Web has changed significantly during these past five years. With ECMAScript (ES) 2015, we have modules, classes and arrow functions. Angular 2 leverages these features to make its coding patterns more consistent and easier to learn. Add to that Typescript, a language t...
<a href="https://www.mytectra.com/interview-question/human-resourse-hr-interview-questions/">Human Resource (HR) Interview Questions</a> <a href="https://www.mytectra.com/interview-question/selenium-interview-questions-and-answers/">Selenium Interview Questions and Answers</a> <a href="https://www.mytectra.com/interview-question/javascript-interview-questions/">Javascript Interview Questions</a>
Comments
Post a Comment