Jump to content

[SOLVED] PHP "->" What does that mean?


Garath531

Recommended Posts

Yeah, in alot of languages most properties or functions are accessed using ., rather than -> but it's the same thing.

 

Like if you create a class, and a function within the class.

 

Let's assume the class is called test_class and the function test_function.

 

Also assuming the class is in the same document (for the purpose of simplcitiy) you could call the function like:

 

test_class->test_function();

 

I came across this the other night, though I don't use classing myself, no need for it really, extra bloat when unnecessary but it has it's used.

I came across this the other night, though I don't use classing myself, no need for it really, extra bloat when unnecessary but it has it's used.

 

Yes there is need for it because doing so actually reduces bloating significantly. Learn to become proficient in OOP before you dismiss it so easily. There are quite a lot of things you can do with OOP that make your code both smarter and less bloated that cannot be done in "Procedural".

 

-> means "Points at"

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.