Re: Easier way to get the name of a variable?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, August 15, 2006 7:01 pm, Larry Garfield wrote:
> On Tuesday 15 August 2006 16:50, Richard Lynch wrote:
>
>> If the names are not predictable, the array solution is probably
>> best,
>> as there is movement in the PHP Internals list that may (or may not)
>> make it impossible to dynamically add a property to an object.  I've
>> lost track of where that thread ended, so apologies if this is a
>> non-issue.
>
> Gah!  Please tell me you're joking.  That would kill one of PHP's best
> features, the fact that you can have dynamic data structures.
>
> PHP != Java!!!

I was partly wrong.

This would only apply (if it applies at all) for static vars.

class foo { };
$foo = new foo;
foo->whatever = 5; //ok
foo::something = 5; //E_STRICT error, maybe, depending on Internals
flamewar outcome...

Richard "Swiss cheese memory" Lynch :-)

-- 
Like Music?
http://l-i-e.com/artists.htm

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux