helly           Mon Oct  4 13:31:38 2004 EDT

  Added files:                 (Branch: PHP_5_0)
    /php-src/tests/classes      static_this.phpt 
  Log:
  - MFH Add new test
  

http://cvs.php.net/co.php/php-src/tests/classes/static_this.phpt?r=1.1&p=1
Index: php-src/tests/classes/static_this.phpt
+++ php-src/tests/classes/static_this.phpt
--TEST--
$this can be an argument to a static function
--FILE--
<?php

class TestClass
{
        function __construct()
        {
                self::Test1();
                $this->Test1();
        }

        static function Test1()
        {
                var_dump($this);
        }

        static function Test2($this)
        {
                var_dump($this);
        }
}

$obj = new TestClass;
TestClass::Test2(new stdClass);

?>
===DONE===
--EXPECTF--

Notice: Undefined variable:  this in %sstatic_this.php on line %d
NULL

Notice: Undefined variable:  this in %sstatic_this.php on line %d
NULL
object(stdClass)#%d (0) {
}
===DONE===

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

Reply via email to