473,324 Members | 2,417 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,324 software developers and data experts.

Request for PHP Object Oriented Programming Interview questions

vivekgs2007
Hi to all,
I am requesting to all to post some php5 and php6 interview questions and answers, I found it difficult in answering php oops concept, i am facing an interview for that. please help me in that.
I hope u ill learnt that.
I will waiting for your reply
Jul 22 '10 #1
5 3263
dgreenhouse
250 Expert 100+
What is the difference between public, private, and protected attributes and methods?

Write a class showing the usage of each?

What is the best way to access a class's (object's) internal attributes and what type of access designation should the attributes be set as?

What is a singleton?

Write a class that implements a singleton.

Why would you use a factory pattern?

Show some example code using cURL...

These are just some starters...

I have to say, if you're going to an interview and asking the above question, expecting to be "drilled" on your knowledge of OOP, and don't know it at even a simple level, you may want to think about studying for awhile....
Jul 23 '10 #2
dlite922
1,584 Expert 1GB
What is MVC and what are some of the popular frameworks that utilize it?

What is the difference between static and constant members?

In PHP, will the child class automatically call the parent constructor? (yes|no)

What is overloading?

Name some of the magic methods in PHP classes.


How do you efficiently save an object to a text file and restore it to an object by reading the file? (HINT:serialize/unserialize)

What is an abstract class?

What does the final keyword do to a class?

True or False, the following code shows how to copy an object and change the copy without affecting the original object?

Expand|Select|Wrap|Line Numbers
  1. $foo = new SomeClass(); 
  2.  
  3. $bar = $foo; 
  4.  
  5. $bar->test = 'baz'
  6.  
  7. echo $foo->test; 
  8.  
  9.  
What is the output of the above code?

What is type hinting?


Good Luck!


Dan
Jul 23 '10 #3
dgreenhouse
250 Expert 100+
I'd have to say that dlite922's questions and format are a bit better and he(she?) was a bit nicer than I was. If I was a little short, I apologize. If you have access to books online, check out "Object-Oriented PHP" by Peter Lavin. That should give you some basis for further study.

Also, use this search to find lots of links to study:
http://www.google.com/#hl=en&q=object+oriented+php
Jul 24 '10 #4
Markus
6,050 Expert 4TB
What is and what are the benefits of:
  1. Encapsulation;
  2. Inheritance;
  3. Polymorphism;
  4. Interfaces;
  5. and, Abstract classes;
Jul 24 '10 #5
Thanks for all I used it well..i got job also....thank q very much..
Aug 23 '10 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

6
by: Andy | last post by:
hI, wOULD PLEASE HELP ME. I AM GETTIGN THE REQUEST OBJECT ERROS ASP 0105: 80004005 INDEX OUT OF RANGE ERROR. HERE IS THE SNIPPET OF CODE THAT I AM USING. WHAT IS WRONG HERE? YOU CAN SEE WHAT I AM...
10
by: thomas parquier | last post by:
Hello Can someone give the snippet to send a post http request in order to send a soap request ? I have the complete http request but I don't know how to send it. TIA
3
by: Dr. Zharkov | last post by:
Hello. I converted the project from VB6 in VB .NET 2003, however in the following loop there are errors of a upgrade (in Help of VB .NET 2003 is not written, how to correct these errors): For x...
0
by: Ricardo | last post by:
I'm writing a Windows Forms application which gets data through a Web Service. I'm trying to use the IIS HTTP 1.1 native compression. In order to do that I've added the following methods to the...
0
by: su.k.mishra | last post by:
Hello Friends, Please Visit http://techinterviewquestion.blogspot.com site In this site you can find .Net,C#,OOPS,Java,JSP Interview Question With Answer. Cmpany asked question is also...
0
by: su.k.mishra | last post by:
Hello Friends, Please Visit http://techinterviewquestion.blogspot.com site In this site you can find .Net,C#,c++,OOPS,Java,WebService & Remoting ,JSP Interview Question With Answer. Cmpany asked...
0
by: mattng604 | last post by:
Hi, I am trying to typecast a void* pointer to a structure I defined called _sfrdm336_mdb. However, when I try, I get the following error: Oops in fault.c, Unable to handle kernel paging...
0
by: buntyindia | last post by:
Hi, I have a very strange problem with my application. I have developed it using Struts. I have a TextBox With Some fixed value in it and on Submit iam passing it to another page. <html:form...
1
by: DavesBug | last post by:
Hi all and thanks in advance for any help you can provide. Like most people I've copied some code from the internet and modified it to suit my needs. I am passing xml data to a form for editing and...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.