https://codetones.com
  • How To Display Code Errors In Web Development >> To display code errors while coding, it is the best... << Read More >>
  • How to Speed Up Your WordPress | Top Tips to Optimize Your WordPress Website >> WordPress is the world's fastest CMS (Content Management System) name... << Read More >>
  • Those 3 Errors Programmers Should Avoid >> Programmers do not often notice that 99.99% of users do... << Read More >>
  • Boot Your PC By USB Pendrive Without Any Software >> Most of the new computer users are currently using a... << Read More >>
  • How Web Designers Will Start Freelancing >> Working with Web Designing is a good option to start... << Read More >>
  • .htaccess Web Developing :: Basic to Advanced >> .htaccess is a very useful topic for web developers. We... << Read More >>
  • 12 Tips And Trick For Computer You must know >> The computer made our life easier to a great extent.... << Read More >>
Facebook Twitter Google Plus Linkedin RSS Youtube

Codetones

Only for Creative mind

  • Home
     
  • PC Helpers
     
  • Technews
     
  • Tutorials
     
    • HTML
    • CSS
    • PHP
    • WordPress
  • Code FAQ
     
  • Users
     
    • Login
    • Create An Account
  • About Us
     
  • Contact Us
     
Home Page > Tutorials > PHP > Top 10 Common Interview Question In PHP For Job Interview

Top 10 Common Interview Question In PHP For Job Interview

author Author: Calixto

icon-calendar Date: 3 years ago

view Views: 1258

icon-comment Comments: 7

Share on

Facebook Twitter Google Plus Linkedin
Interview Question In PHP

PHP is a server side language. PHP is an important part of web application. It is rich and secure web languate to build web application. Every web applicaton developer should have the base knowledge in PHP.
Here we come to assist you most common interview question for job preparation.

1. First Question and most common question is : What is PHP?

PHP is  server side scripting language. PHP is an object oriented programming language as like C-sharp , jave. PHP is a powerful language to build in a dynamic and secure Web pages. PHP is free, widely used Programming language and good alternative of Microsoft's ASP. PHP has vast source such as PHP has many Frameworks and CMS. For example Wordpress, Oscommerce are the most popular CSM of PHP. Even a non programmer can easily create sites using those CMS.

2. What’s the difference between the include() and require() functions?

Those two functions perform similar work. Both function is used to connect any specific file. But main difference between those two functions that require() function display a fatal error while require() function doesn't find that specific file.

 <?php
   require('specific file path here');
?>

on the other hand include() function doesn't show any fatal error if include() function doesn't find that specific file.

 <?php
   include('specific file path here');
?>

If any file is essential for your project or without that file your project doesn't run well. In that case we recommend you to use require() function else we recmmend you to use include() function. 

3. How can we get the IP address of the client?

This question mainly asked to know how creative the candidate is because there are many option to get the IP address of the client. Easiest solution is $_SERVER["REMOTE_ADDR"];  But sometime $_SERVER["REMOTE_ADDR"] doesn't show real IP. It show client proxy IP. $_SERVER["REMOTE_ADDR"] is used to get real IP.

4. What’s the difference between unset() and unlink() ?

In PHP unlink() functions are used to delete a file permanantly from the project. On the other hand unset() functions are used to remove contents or make it undefine instead of deleting a file permanently for the directory.

5. What are the main error types in PHP and how do they differ?

In PHP you can get three type of errors:
Notices – Non-critical errors that are occurred during the script execution. For an example of this Notice can be shown for accessing an undefined variable.
Warnings – More important errors than Notices. In that situation the scripts continue the execution. For example  include() a file that does not exist.
Fatal – This type of error doesn't ignore and it stop the script execution.

6. What is the difference between GET and POST?

GET  submition data pass through the URL  and  POST  encoded  data in the request.
GET can handle a maximum of 2048 characters through the URL on the other hand POST has no such limitation.
GET allows only ASCII data. In that case POST has no restrictions.
GET is used to get data while POST to insert and update.

7. How can you enable error reporting in PHP?

It can enable in php.ini file by check on display_errors. It also can enable by ini_set('display_errors', 1) in  the php script. error_reporting(E_ALL) Enabling error messages is very important while developing project.

8. What are Traits?

Trait is one of powerful features of PHP. Traits allow to create reusable code in PHP.

9. Can you extend a Final defined class?

Not at all, It is not possible to extend a Final defined class. It is decalare to prevents child class access.

10. What are the __construct() and __destruct() methods in a PHP class?

The __constructor() method is called immediately after a new instance of the class is being createdThe Destructor method use to destroy a variable or session.

Related Posts

Top PHP & Mysql Questions

Top PHP & Mysql Questions

Top 8 PHP Learning Books

Top 8 PHP Learning Books

.htaccess

.htaccess

Convert HTML and CSS to PDF

Convert HTML and CSS to PDF

Leave a Reply

Jun 5

whoah this blog is fantastic i like studying your posts. Stay up the good work! You know, many people are looking round for this info, you could help them greatly.
                                 

by business tips

Reply

Jun 30

Everyone loves what you guys are up too. This type of clever work and coverage! Keep up the wonderful works guys I've  you guys to our blogroll.
masters education http://educationtip.eu/                                    
                                

by masters education

Jun 30

Fastidious answer back in return of this matter with real arguments and telling the whole thing concerning that.
homeschooling http://educationpoint.eu/                                    
                                

by homeschooling

Jun 29

Undeniably believe that which you stated. Your favorite justification appeared to be on the internet the easiest thing to be aware of. I say to you, I certainly get irked while people consider worries that they just don't know about. You managed to hit the nail upon the top and defined out the whole thing without having side effect , people could take a signal. Will likely be back to get more. Thanks
education degree http://eduhints.eu/                                    
                                

by education degree

Jun 27

Hello, I enjoy reading all of your article post. I wanted to write a little comment to support you.
board of education http://educationpoints.eu/                                    
                                

by board of education

Jun 25

Undeniably believe that which you stated. Your favorite reason appeared to be on the internet the easiest thing to be aware of. I say to you, I definitely get irked while people think about worries that they plainly don't know about. You managed to hit the nail upon the top as well as defined out the whole thing without having side-effects , people could take a signal. Will likely be back to get more. Thanks
jobs http://employmentclue.eu/                                    
                                

by jobs

Jun 21

Stay with us and we'll provide some more related posts @codetones.                                    
                                

by Calixto

Codetones Adblocker Notice

AdBlocker Detected

Please disable your adblocker
This site is supported by the advertisement
Please disable your adblocker to support us !

Online Tools

  • Image Convertor
  • File Convertor
  • Watermark On Image
  • Hash Password
  • Secure Password Generator
  • Color to Black & White Image
  • Black & White to Color Image

Popular Posts

Top 10 Code Editors For Programmers | Best Code Editor For Web Developer 2017
Top 10 Code Editors For Programmers | Best Code Editor For Web Deve...
How to Speed Up Your WordPress | Top Tips to Optimize Your WordPress Website
How to Speed Up Your WordPress | Top Tips to Optimize Your WordPres...
The Importance Tips To Start a Professional Web Pages Designing
The Importance Tips To Start a Professional Web Pages Designing
What is Google Adword Keyword Planner? How is it done for SEO
What is Google Adword Keyword Planner? How is it done for SEO
What is the Domain Authority or the Page Authority? How do I check the Domain Authority account?
What is the Domain Authority or the Page Authority? How do I check ...
Large-Skycraper

Categories

  • HTML
  • CSS
  • PHP
  • WordPress

Join Codetones

Facebook Twitter Google Plus Linkedin RSS Youtube

Codetones

Codetones is the Web Solution Base Website. Here You Can Find Beginner to Advanced Level Tutorials.

Support

  • About Us
  • Contact Us
  • Codetones Mobile Apps

Accessibility

  • Terms of Use
  • Privacy Policy
  • Site Map
© Copyright 2019 Codetones. All Right Reserved

Powered by Codetones