Possible Duplicate: What's the difference between :: (double colon) and -> (arrow) in PHP?
Reference - What does this symbol mean in PHP?
I'm quite decent with PHP, but only procedural. So I decided to venture forth into learning object oriented. I'm getting the hang of it, and liking it quite well.
On PHP.net, I've always seen object oriented as mysqli::query
.
However, every example I've seen uses mysqli->query
as well as what I have always used.
Today, I ran across actually seeing ::
used in a class example.
So now, my question is, is there a difference between ::
and ->
?
Is it like the difference between "
and '
?
::
is for calling static methods, ->
is for instance methods
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With