<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
7 Reasons you should learn Python now
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++. Sure, it’s old, but it’s 1980s old, not Cobol or Fortran old. Besides, if something works, why change it, especially when there are a so many ways to improve it. Actually, depending on how you view it, longevity is a good thing in itself—a sign of stability and reliability. If you’re like many people who first started out with Java, C, or Perl, the learning curve for Python is practically nonexistent. But the fact that it’s easy to learn is also the reason why some people don’t see Python as a necessary programming skill. I’ll be honest with you, my love of Python didn’t really develop until a few years ago. It took a long career of painful lessons to appreciate everything this language and platform have to offer. My goal with this short post is to save you the same pain, and convince you why...
Top 25 Data Science Interview Questions and Answers
1) How would you create a taxonomy to identify key customer trends in unstructured data? The best way to approach this question is to mention that it is good to check with the business owner and understand their objectives before categorizing the data. Having done this, it is always good to follow an iterative approach by pulling new data samples and improving the model accordingly by validating it for accuracy by soliciting feedback from the stakeholders of the business. This helps ensure that your model is producing actionable results and improving over the time. 2) Python or R – Which one would you prefer for text analytics? The best possible answer for this would be Python because it has Pandas library that provides easy to use data structures and high performance data analysis tools. 3) Which technique is used to predict categorical responses? Classification technique is used widely in mining for classifying data sets. 4) What is logistic regression? Or St...
Android Training in Bangalore
Java Concepts Oops Concepts Inheritance In Detail Exception Handling Packages & Interfaces Jvm & .Jar File Extension Multi Threading (Thread Class & Rentable Interface) Sql Dml and Ddl Queries In Brief Introduction To Android What Is Android? Setting Up Development Environment Dalvik Virtual Machine & .Apk File Extension Fundamentals: A. Basic Building Blocks - Activities,Services,Broadcast Receivers & Content Providers B. Ui Components - Views & Notifications C. Components For Communication -Intents & Intent Filters Android Api Levels (Versions & Version Names) >>read more >>
Comments
Post a Comment