Posted by Chung Leong on 11/19/03 11:47
tony@tony.com wrote:
> When debugging the blowfish utility I noticed that
>
> $bf = new Crypt_Blowfish($mykey);
> echo("BF: " . $bf");
>
> Outputs the word "OBJECT" on a PHP-4 linux system
>
> and "OBJECT id #1" on a windoze PHP-5 system
>
> Can anyone confirm this is correct and even better -
> explain what the output of each is please
> (I dont understand PHP classes yet)
The "Object ..." string is the result of PHP converting an object to a
string. The id # in PHP5 is a new feature. Internally, the Zend 2
engine keeps track of all objects in an array. An object's id is its
place within that array.
The object id is useful for debugging purpose. It also give you a way
to use objects as keys to a hash table.
Navigation:
[Reply to this message]
|