Hi folks,

Here are 10 very common questions that every fresher PHP programmer is expected to know.

  1. What is the difference between include and require
  2. What is the difference between Session and Cookie
  3. How do you create a cookie, add data to it, and remove data from a cookie
  4. How do you create a session, add data to a session and remove data from a session
  5. If cookies are disabled will the sessions work? Why?
  6. What is the difference between a framework, IDE, CMS, Blog
  7. What is the difference between $var and $$var
  8. If a form does not have submit button, how do you submit a form?
  9. Write a function to calculate x to the power y without using the pow function of PHP
  10. What is the difference between client side validation and server side validation and what is more secure and why?

I know this is a very small collection of questions that we could publish now. I plan to add more questions in future as time permits.

How many answers do you know?

Did you know that the students of Core PHP Training (Regular) and Core PHP Training (Weekend) courses know the answer to all these and hundreds of other interview questions.

63 Responses to “10 common PHP interview questions for PHP jobs for freshers in Indore”

  1. Neha says:

    Which CMS is more powerfull Drupal,Cake,Joomla or WordPress.

    • Gunjan says:

      Hi Neha,
      CakePHP is a framework not a CMS.
      Asking a question which CMS is more powerful is like asking which is better to eat… salt or sugar.
      All the CMS were designed with specific requirements in mind and they excel in those areas…
      So if your site needs a blog kind of regular news updates, WordPress rules and so on.
      Secondly, the usefulness of CMS also depends on what kinds of Plugins are available for each of them. That way, you can extend the functionality of any CMS to suit your exact requirements.
      Fortunately, all the three CMS have a very extensive and feature rich plugin library.

      Finally, it all boils down to the fact that how comfortable are you with the code of each of the CMS.
      The most powerful CMS is the one, which you can change to suit your requirements.

      I hope this helps.

    • Geniusthinking says:

      Joomla, WordPress or Drupal CMS? Confuse to determine what you’ll choose? There are many applications to make website. Some of them are Joomla, WordPress, and Drupal. They are three major CMS (Content Management System). Many bloggers have made comparisons of these three major CMS. From that comparison, we can see the best one. However, all of them have superiorities and weakness. Let’s us make some comparisons of these three CMS, that may help you to choose the best one for your purposes.

      Here we will discuss Joomla versus WordPress versus Drupal.

      Firstly, we see the Joomla. Joomla is CMS that is more powerful for full-blown CMS. Joomla CMS is a piece of cake or very easy to install. It is also fairly easy and straightforward in using it. About the administration, Joomla has very graphical and intuitive administration and the selections of themes also good. Joomla requires openSEF or SEO (Search Engine Optimizations) extension and it may offer security risks due to SEO changes. However, you can create blog easily with Joomla. Web 2.0 of Joomla still has the older content driven aspects and less community focus. It is lack of permissions control, decent scalability, and has no multisite. The categorization is limited and its SSL requires some programming. The speed of Joomla is very fast with rendering pages but also can slow down when features are added. The download size is 878 kb.

      Secondly, we talk about WordPress. WordPress CMS is an application to build blog with various selections of themes. Like Joomla, WordPress is easy to install and to use. Everybody can do it. Moreover, it is very easy to administer the site. Comparing with Joomla, WordPress has excellent and large theme selections. The SEO is very fantastic. All contents have unique page with an SEO friendly and title and URL.

      WordPress is the best blogging software. It is very web. 2.0 and has permissions control. It has limited scalability, no multisite and SSL. The download size is 802 kb. The last is Drupal which is great for blogs. It is easy to install. The theme is lacking when we compare with those two. The SEO is fantastic. It has pure web. 2, built in SSL, very granural permissions, and great scalability. The speed is very efficient and the size of download is 728 kb.

      They are some comparisons of the three CMS that may help you in choosing the best one for you. You can also choose them based on your purposes. However, if you are challenged to try the difficult one, you can choose Drupal.

  2. Danish says:

    dear friends
    i m doing internship in one small company. we are using advanced php thre (php using mvc) but thre i dont hv proper guide thre to help… now i got the another opportunity in another company thre they are providing the good guidance but they are using core PHP… which one i should choose now

    • Gunjan says:

      MVC is super duper important because that is the future of PHP and any decent company in which you plan to work would be using it. But then again, you cannot work on MVC directly. You must have a good understanding of the basics of PHP. It is like trying to write poerty without knowing A B C.
      The ideal condition would be to join a company which focuses on Core PHP and then guides you to MVC.
      If you want to explore PHP learning opportunities at Stepping Stone, call us at 9893551773 to know more. We can help.

  3. priyank khandelwal says:

    muje full php lern karna he..

  4. mayank tyagi says:

    thre is only one place to learn PHP

    • Gunjan says:

      Hi Mayank,
      There are many places in Indore where you can learn PHP but the quality and experience of the tutors differ from place to place. You should check personally or follow references of friends before joining any of the trainings.

  5. Praful says:

    Hello Sir,

    I want to ask u one question that what is the future of advance php using mvc.
    I am little bit confuse because some of my friends who is working in another company works on core php and according to them the core php has more scope.
    Now what should i do????????? Please guide me…………

    • Gunjan says:

      Hi Praful,
      Your friends are basically very very wrong.
      Almost all good companies work ONLY in advanced PHP with extensive use of OOPs, MVC etc.
      Core PHP with HTML and CSS is step 1 of learning PHP.
      Step 2 is advanced PHP with MVC.
      Step 3 is Javascript with JQuery.
      If you are comfortable with all these three things, you have a very bright career ahead :)

  6. Priyanka Sharma says:

    Dear Sir,

    I want to know, what is approx. salary pacakage for a Fresher Core PHP Developer in Lucknow.

    I am pursuing (result awaited) MCA from IGNOU. and have done 6 month internship in PHP from ESoft Technologies, Lko. and I developed a dummy Project (CRM for Sales Force Automation) as a MCA Final Project but not worked on a LIve Project.

    What should be my expectations as a PHP Developer?

    • Gunjan says:

      Hi Priyanka,
      Unfortunately I am sure about the salary Packages of freshers in Lucknow but usually in B Class cities, the salaries for freshers are in the range of Rs. 5000 per month to Rs. 10,000 per month, depending on your skill and the confidence with which you face the interview.

      It all depends on the companies where you apply. Some companies might also hire you as a trainee and will not pay any salary during the training period.

      Hope that helps.

  7. sir muje joomla sikna he..
    kitni fees he jooma cms ki..and time duration.

  8. Sharmila says:

    Dear Sir,

    Now i am doing RIA certificate course. My qualification is diploma. it is not enough for career. so i want do any degree. which one is best for my career please suggest me . . . .

  9. Dear Sir,

    I want Learn complete PHP Theory and Practical,

    So What I Need To give more concentrate on which ,

    What exactly i need to learn plz Suggest Me Correct. I’m Not aware of Php.

    I Have 0% Knowledge in PHP.

  10. vani says:

    sir i am learning php…… i completed ajax,joomla but i am not sure how to amswer in interview about ajax,joomla,drupla…….
    i am fresher….. i searched some websites but there the qs and ans are very advanced……. is there any website for best php faqs

    • Gunjan says:

      If you do lots of practice, you will have no problems in answering any questions.
      Apart from that Google is your best friend :)

      The best way is to discuss your doubts with experienced developers. They can guide you in a better manner.

  11. vani says:

    hi sir thankyou………..
    our friend told me that now joomla’s and drupal’s usage will decreased
    and mezento tool will repalce their position……..as a fresher is it nessasery to learn mezento tool………………and can you provide basic info about on this tool

    • Gunjan says:

      Your friends are misguided or mis-informed or both :)

      Magento is a shopping cart, Joomla and Drupal are CMSs… two totally different things… like apples and oranges. They will never replace each other.

      The first thing you should do is STOP listening to your friends and talk to professionals.
      एक अँधा जब दूसरे अंधे को रास्ता दिखाता है तब दोनों गड्ढे में गिरते हैं :)
      If you get in touch with any PHP professional, I am sure he/she will help you.
      If you are at Indore, come visit us at http://www.steppingstone.in/contact for a chat :)

  12. vaibhav says:

    hello sir,

    sir mujhe cms joomla and cake php k basics kaha se easy rahenge padna ……i have good knlg of php core

    • Gunjan says:

      First you should read the official documentation of these frameworks/cms.
      All these frameworks and CMSs have an extensive documentation and tutorials on their site.

      After that, Google is your friend :)

      But the best learning will happen if you study from somebody with experience. He can guide you with the 20% things that gets 80% work done.

      Best of luck with your learning.

      • narender says:

        i am learning drupal and joomla and i have done core php and web designing
        kya aap mujhe drupal or joomla ki kuch websites bata sakte ho

        • Gunjan says:

          Google is your best friends. Usually the showcase section of Joomla Website and Drupal website would have examples of these sites.
          Check that out.

  13. govinda yadav says:

    i make some web sites like //hindikaraokeshop.com //industrialprogressivecentre.com //tutortrek.co.in
    so could u tell how can i improve my self ?

  14. Dheeraj says:

    Hello Sir;
    I have 1 year experience in Php, joomla and wordpress but my salary package is very low and now taking class for PHP(Pear) from my elder brother.Can i start give interviews while i am taking classes of PHP(pear)

    Thanks in advance

    • Gunjan says:

      Yes sure. The more interviews you give, the more idea you will get of what kind of questions are asked by the interviewers.
      Apart from PEAR, I also recommend studying OOPs, MVC framework like CodeIgniter, JavaScript and JQuery.

      Best of luck.

  15. anil says:

    hello gunjan sir my self anil thapa i am your old student in core php but i have no job because’ all company is tell me php fresher student ir require any one fremwork is working so pls tell me sir me kya karu

    • Gunjan says:

      Hi Anil,
      Please visit our office urgently and meet Madhulika.
      There are lots of requirements from companies in Indore in core PHP and she will definitely help.

      You can also contact her at 9893-551773 for help between 10am and 6pm.

      Take care,

  16. Robin says:

    heloo ! sir i know some php, mysql, AJAX coding. overall i can create a simple but contentfull dynamic web site. So pla help me to find out joj anywhere. no matter about salary.

    • Gunjan says:

      Hi Robin,
      Now you will have to find some way to convince the companies that you are telling the truth.
      The best way for you would be to create some sites with cool features and show that as a demo in your resume.

      That will definitely help.

  17. Ramya says:

    Hi, i am using core framework in my php project. which is efficient either php framework or core framework

    • Gunjan says:

      Theoretically, core php will always be faster in performance as compared to any framework.
      But the advantage of using a framework far outweigh this overhead.
      If you use a framework then the development time reduces considerably, the code is becomes very secure and scalable and is very easy to maintain (Because you are forced to follow the standards of the framework).
      Considering all these things, I strongly recommend using frameworks like CodeIgniter, Yii, Zend etc.

      Hope this helps,

  18. poonam says:

    i complete my training in php but i am not confidence i have all the answer of php question and how i am doing practice in php

    • Gunjan says:

      Hi Poonam,
      If you have completed your training in PHP, then you must try and create lots of projects.
      You can also go to freelance sites like scriptlance, elance, freelancers, vcoders, odesk etc to see what kinds of projects client have in php and develop your skills in those areas.
      The only way you will have confidence to answer all interview questions is if you really work on these tasks.
      Do not hesitate to contact me if you need any help.

      Take care,

  19. Ramya says:


    What is PEAR (PHP EXTENSION AND APPLICATION REPOSITORY)? Is it like a framework?

  20. dinesh chandra says:

    what is the php in the work in feture have sucess…

  21. Madan Kumar says:

    when u taking about Powerful CMS …
    my first recomendation is Joomla
    second is Drupal and third is WordPress

    when u taking about CMS Flexibility…
    my first recomendation is WordPress…

  22. priya says:

    i complete my colleg. & my project in php but i am not confidence i have all the answer of php question and how i am doing practice in php class. & i’m not disaited by in my fuchture work. plz happy me. sir
    sir me thoda english me nhi bol pa rhe hu. sir me bhut preshan hu ki me job kha pr or kese kru. mujhe koi compny nhi mil pa rhi h. so plz happy me. thankx………

  23. ponam says:

    hey gunjan i hve done php course and want to do a job can u help me …pls reply

    • Gunjan says:

      Yes sure, Call Madhulika at 0731-2531019 between 9:30 AM till 6 PM and discuss your case with her. She looks after placements here.

  24. Ramya says:


    What is memcache? i thought this is used for social network like facebook application. what is the difference between memcache & memcached?

  25. Husain Ahmed says:

    HI i am employee of a s/w comp. in indore . i dont have knowledge of MVC or any other latest tech. i wanna lenn to all php latest tech. right now i am working on core php..at sarvatman technology indore….

  26. raghu says:

    Im raghu,
    Sir ur all comment very good information provds to me. And I just completed my diplom in computer science.. Im very much interest in softwere feld so sir plz help me which programming lagua cours is better futur.im planing for Jave or web based. Plz help …..waiting

  27. deepak kumar says:

    hi sir
    what is the future of php than other language?

  28. Neha says:

    Please explain me what is the difference between core PHP and Advanced PHP ?

    • Gunjan says:

      Core PHP covers the essential language syntaxes and structures.
      It covers mostly procedural process of coding.

      Advanced PHP covers topics like OOPs, MVC, CMS etc.

Leave a Reply

Free WordPress Themes