#18610 [NEW]: Name Space Issues / Reserved Words

From: Date: Sat, 27 Jul 2002 22:45:47 +0000
Subject: #18610 [NEW]: Name Space Issues / Reserved Words
Groups: php.bugs php.doc 
Request: Send a blank email to php-bugs+get-15428@lists.php.net to get a copy of this message
From:             ralph@_snarff.net
Operating system: Linux 2.4.18
PHP version:      4.2.2
PHP Bug Type:     Documentation problem
Bug description:  Name Space Issues / Reserved Words

When using a class (more spifically) something like Date/Calc.php supplied
with PEAR:  When I set a variable named "$this" before calling any class
functions, it produces a warning.

example:
<?

include("Date/Calc.php");

$this = "some text";

echo Date_Calc::dateNow("%Y%m%d");

?>

Output:
--------
Warning: Problem with method call - please report this bug in <<FILENAME>>
on line <<LINENUMBER>>
20020727

--------

As I am not familar with the Zend scripting engine, so this may be a bug
in the rendering since it does produce only a warning, yet still operates.
 But if it is not, then documentation on the word "this" should be located
in the documentation in the following places:

http://www.php.net/manual/en/reserved.php#reserved.keywords

and again under:

http://www.php.net/manual/en/language.oop.php
(where $this is actually used)

Thanks,
Ralph Schindler


-- 
Edit bug report at http://bugs.php.net/?id=18610&edit=1
-- 
Fixed in CVS:        http://bugs.php.net/fix.php?id=18610&r=fixedcvs
Fixed in release:    http://bugs.php.net/fix.php?id=18610&r=alreadyfixed
Need backtrace:      http://bugs.php.net/fix.php?id=18610&r=needtrace
Try newer version:   http://bugs.php.net/fix.php?id=18610&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=18610&r=support
Expected behavior:   http://bugs.php.net/fix.php?id=18610&r=notwrong
Not enough info:     http://bugs.php.net/fix.php?id=18610&r=notenoughinfo
Submitted twice:     http://bugs.php.net/fix.php?id=18610&r=submittedtwice
register_globals:    http://bugs.php.net/fix.php?id=18610&r=globals



Thread (3 messages)

« previous php.bugs (#15428) next »