MYSQLi Syntax in PHP Reference Guide

Why is the double underscore used in the reference guide for mysqli.

I know that it usually means we are accessing a static method or variable. For example, mysqli::debug is written using the double colon. When accessing this, would I access it via the mysqli object I have made or access it in a static fashion like this, $mysqli->debug;

Also if it is static, the modifiers on reference do not say that it is.
namsu55Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Ray PaseurCommented:
Please post a link to the double-underscore you are seeing.  

Generally, the method names starting with the double underscore are reserved to PHP for things like the constructor named "__construct()"

The double colon is the scope-resolution operator, explained here:
http://php.net/manual/en/keyword.paamayim-nekudotayim.php
namsu55Author Commented:
Have a look at this: http://uk3.php.net/manual/en/book.mysqli.php

I will read that link you have sent me.
Ray PaseurCommented:
OK, thanks.  If I'm guessing right, this is one of the double underscore methods:
http://php.net/manual/en/mysqli.connect.php

Have a look at that description and at this, and post back with any specific questions.  
http://www.php.net/manual/en/language.oop5.magic.php

Best regards, ~Ray
Introduction to R

R is considered the predominant language for data scientist and statisticians. Learn how to use R for your own data science projects.

namsu55Author Commented:
Sorry Ray, my mistake here. I am talking about the double colon methods on mysqli. Double underscore are magic methods like __construct and I know about them.

Go and click on the mysqli reference link I gave. I am confused as to why some of them are listed using double colons as opposed to ->.

The first post you gave is the link I need to read up.
namsu55Author Commented:
Hi Ray, I have noticed something now. The properties (class variables) are all defined on the reference page as -> whilst the methods of mysqli are defined as double colon.

http://www.php.net/manual/en/class.mysqli.php
Ray PaseurCommented:
Yes, in PHP OOP notation methods and properties are identified differently.  If you read all the pages linked from this one, you will have a clear understanding of what they are doing with the notation.
http://us3.php.net/manual/en/language.oop5.php

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Ray PaseurCommented:
Suppose I should also note the terminology, too.

Methods are functions within a class
Properties are variables within a class.
namsu55Author Commented:
I understand everything about objects and classes but was a bit confused by the notation on the manual. In Java I am used to reading the API a certain way. So in PHP the usual way would be for me to write an object, and access methods via the object and not using double colon as if they were static, although it seems to be legal in certain cases.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
PHP

From novice to tech pro — start learning today.