Re: PHP 4.3.11, call_user_func and instances of classes

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

 



On Wed, April 26, 2006 6:46 pm, David Otton wrote:
>     class Test {
>         var $x;
>         function Test ()
>         {
>             global $addition, $subtraction;
>             $this->x = 0;
>             $addition = array ($this, 'AddOne');
>             $subtraction = array ($this, 'SubtractOne');

Unsolicited Advice:

You MIGHT also want to consider using $this->addition and
$this->subtraction instead of global variables.

Just a bit cleaner, I think.

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