What does $firephp->* means?

I’m trying out firephp to see if it helps produce nicer array prints easily.

I happen to see this statement at their website http://www.firephp.org/HQ/Use.htm

require_once(‘FirePHPCore/FirePHP.class.php’);
$firephp = FirePHP::getInstance(true);
$firephp-> *

require_once(‘FirePHPCore/fb.php’);
FB:: *

$firephp->setEnabled(false); // or FB::

FB::send(/* See fb() */);

I’m wondering what $firephp-> * and FB:: * means. Never come across such usage before.

haha…oh i see…

that * was just to illustrate that we could access all the methods using that instance?

sheesh…i thought it was some new php syntax haha. what a blunder. thanks for clarifying.

$firephp-> means that the variable $firephp is an instance of the FirePHP object. This instance is created by the getInstance method. The arrow indicates that the instance of the object has properties or methods -they are accessed with ->.

FB::send means accessing the “send” method. The :: indicates it is a static method. That means the method can be accessed directly from the object, without creating an instance of it.

The * is not standard or anything, it’s just them showing how you can access the methods and properties of FirePHP. There is no method or property called “*”.

For more info, have a look at the PHP5 OOP section in the PHP manual.

Welcome to the world of Object Oriented PHP :slight_smile:

I hope you enjoy your stay. In fact, I know you will :slight_smile:

Off Topic:

Someone said the same thing to me when I asked a similar question a few years ago. It took me a while to understand what they meant - but I certainly do now!

If you delve into OOP as much as you can, it will revolutionise your PHP and even overall programming. When you think you’ve grasped OOP as a concept, take a visit to the ‘Application Design’ subforum of PHP - you will learn an awful lot of very interesting stuff :stuck_out_tongue:

In addition to what Raffles and Jake Arkinstall said, the * means “wildcard” or “whatever”
well, except for in the /* … */, thats a non-parsed comment.

Easier than listing a bunch of possible real methods