Re: Re: [NEWBIE GUIDE] For the benefit of new members

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

 



> Oh and by the way, whenever I'm creating the skeleton of a new class I
> will usually insert the following code snippet into the functions to let
> me know I have to come back and actually implement it later.
>
> if ($class = __CLASS__) {
>    trigger_error(__CLASS__ . '::' . __FUNCTION__ . ' is not finished.',
> E_USER_WARNING);
> } else {
>    trigger_error(__FUNCTION__ . ' is not finished.', E_USER_WARNING);
> }

Why the assignment to $class?

Is that supposed to be == or is it just allowing for static class/method
calls with no object instantiated?

And would not 'if (__CLASS__)' serve just as well?

-- 
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