On Nov 2, 2008, at 10:39 AM, Daniel Lopez wrote:

> Hi again,
>
> I think I found something related to the issue, as Quercus seems to
> have some problems with PHP static members.

I've files this at: http://bugs.caucho.com/view.php?id=3038

-- Scott

>
> I created the following test:
> ***************************************
> <?
> class Test
> {
>       protected static $_instance = null;
>       protected $_variable = null;
>       /**
>      * Singleton instance
>      */
>     public static function getInstance()
>     {
>         $reflection = new ReflectionClass('Test');
>         foreach ($reflection->getProperties() as $property) {
>             $name = $property->getName();
>               echo "Member: ".$name."<BR />"
>         }
>       if (null === self::$_instance) {
>             self::$_instance = new self();
>         }
>
>         return self::$_instance;
>     }
> }
>       $testInstance = Test::getInstance();
> ?>
> ***************************************
> If I execute the test under regular PHP, the result is:
> ---
> Member: _instance
> Member: _variable
> ---
> If I execute it under Quercus, I just get
> ---
> Member: _variable
> ---
> The strange thing is that accessing the $_instance static memeber in
> this little test works, but a very similar code is inside
> Zend_Controller_Front class in the Zend framework and there it
> complains that $_instance has not been declared, even though you can
> see the declaration a couple of lines above.
>
> So, even though is seems it is not the full issue, it seems to be
> strongly related. In any case, one would say that reflection in
> Quercus is broken, right?
>
> Tested using Resin 3.1.7a and resin 3.2.1. Trying to use Zend in 3.2.1
> I don't get the error I was showing above, but a blank page and no
> error message anywhere.
>
> S!
> D.
>
> ----------------------------------------------------------------
>
>
>
>
>
> _______________________________________________
> resin-interest mailing list
> resin-interest@caucho.com
> http://maillist.caucho.com/mailman/listinfo/resin-interest



_______________________________________________
resin-interest mailing list
resin-interest@caucho.com
http://maillist.caucho.com/mailman/listinfo/resin-interest

Reply via email to