Jump to content

What is an "Object" in Php ?


phpsane

Recommended Posts

Folks,

 

What is an "Object" in php ?

These are not useful:

https://www.google.com/search?q=what+is+an+object+in+php+%3F&oq=what+is+an+object+in+php+%3F&aqs=chrome..69i57j69i64.6694j0j7&sourceid=chrome&ie=UTF-8

 

And these are too complicated as when they try describing an "Object", they shift to "Class". And we know the "Class" is advanced stuff.

https://www.w3schools.com/php/php_datatypes.asp

http://php.net/manual/en/language.types.object.php

And so, to newbies, how can you describe an "Object" in a layman's way without shifting towards more complex stuffs like complex functions, etc. ?

I'd like to see a few examples of an object with very simple & basic coding that is easily understandable to a beginner.

I'm sure future newbies would appreciate your hard work! :)

 

Thanks!

Link to comment
Share on other sites

You probably just need to read up on object-oriented pogramming.

 

Objects and Classes go hand-in-hand, you can't learn one without the other.

 

A class defines a structure that combines both data and functions. The class doesn't have any actual data associated with it, just definitions for what data can be associated with it.

 

An object is an individual instance of a particular class. The object as real data attached to it. Multiple object can be created for a given class, each with it's own set of data.

  • Like 1
Link to comment
Share on other sites

You probably just need to read up on object-oriented pogramming.

 

Objects and Classes go hand-in-hand, you can't learn one without the other.

 

A class defines a structure that combines both data and functions. The class doesn't have any actual data associated with it, just definitions for what data can be associated with it.

 

An object is an individual instance of a particular class. The object as real data attached to it. Multiple object can be created for a given class, each with it's own set of data.

 

When you get the time, would be better if you showed 2 examples and pointed-out the class and the object in your code.

 

Thank you.

Link to comment
Share on other sites

It would be most beneficial if you did some of your own reading instead of begging the forum to spoon-feed you with every question you post.  This is a business that absolutely requires one to read to learn in order to become a decent programmer.  There is no shortcut.  There are no excuses.

Link to comment
Share on other sites

It would be most beneficial if you did some of your own reading instead of begging the forum to spoon-feed you with every question you post.  This is a business that absolutely requires one to read to learn in order to become a decent programmer.  There is no shortcut.  There are no excuses.

 

When the reading gets too complicated speaking robo lang, that's when I try the humans in the forum to speak the human lang. If you get what I mean.

The manual speaks robo lang. Tutorials like the following speak human lang but sometimes they don't go enough deep or don't answer some basic questions. That's- when I hassle the forum. Actually, I'll harass you for answers from now on. Lol! ;)

 

tizag.com

tutorialspoint.com

tutorialrepublic.com

codeacademy.com

 

So, don't you worry. I got my foot in the tutorials. And it's all soaking in the puddle. From time to time, I'll lift the leg up real fast enough for it to generate splashes this way with all the muddy and dirty water. You'll help me in my dirty works (if not do them completely for me. Lol!)

Edited by phpsane
Link to comment
Share on other sites

If you read the OFFICIAL Manual you would get succinct and accurate answers to many of your questions as well as plenty of examples.  

 

Read

Read

Read.

 

BTW - it is not robo language.  It is English.  Are you going to tell your future boss that you can't read and understand English?

Link to comment
Share on other sites

If you read the OFFICIAL Manual you would get succinct and accurate answers to many of your questions as well as plenty of examples.  

 

Read

Read

Read.

 

BTW - it is not robo language.  It is English.  Are you going to tell your future boss that you can't read and understand English?

 

The great thing is: I am not learning php to have any boss. Why go through EDU to be someone else's 9-5 wage slave ?

Why not be selfemployed ?

Study only to be selfemployed. To save yourself from wage slavery. That is the way to go.

Link to comment
Share on other sites

  • 1 year later...

Classes are the wrapper for most of what Objects are.     Programming is ENTIRELY "advanced stuff".  Take it or just leave and find another occupation.

Why do so very, very many people think that this business is supposed-to-be-easy-to-master?  And why do these same people turn to the people (HERE!) THAT HAVE TAKEN THE TIME TO READ AND LEARN when they want answers that they don't want to learn for themselves?

Apparently you are just another non-reading wanna-be.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.