From:             bart_de_boer at msn dot com
Operating system: IIS 5
PHP version:      5.0.0b1 (beta1)
PHP Bug Type:     Class/Object related
Bug description:  classname main reserved?

Description:
------------
I use a class called "main" in my script. When testing with PHP5 I got:

Fatal error: Cannot use 'main' as class name as it is reserved in
D:\Inetpub\wwwroot\test.php on line n

I'm assuming that this means PHP5 will provide some standard way for
defining a main class. I couldn't find anything about it anywhere. Instead
of renaming all my "main" classes I would much rather like to start using
this new main feature right away. 

Reproduce code:
---------------
class main {


}


Expected result:
----------------
Standard class definition or main class definition.

Actual result:
--------------
Fatal error: Cannot use 'main' as class name as it is reserved in
D:\Inetpub\wwwroot\test.php on line n

-- 
Edit bug report at http://bugs.php.net/?id=24422&edit=1
-- 
Try a CVS snapshot:         http://bugs.php.net/fix.php?id=24422&r=trysnapshot
Fixed in CVS:               http://bugs.php.net/fix.php?id=24422&r=fixedcvs
Fixed in release:           http://bugs.php.net/fix.php?id=24422&r=alreadyfixed
Need backtrace:             http://bugs.php.net/fix.php?id=24422&r=needtrace
Try newer version:          http://bugs.php.net/fix.php?id=24422&r=oldversion
Not developer issue:        http://bugs.php.net/fix.php?id=24422&r=support
Expected behavior:          http://bugs.php.net/fix.php?id=24422&r=notwrong
Not enough info:            http://bugs.php.net/fix.php?id=24422&r=notenoughinfo
Submitted twice:            http://bugs.php.net/fix.php?id=24422&r=submittedtwice
register_globals:           http://bugs.php.net/fix.php?id=24422&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=24422&r=php3
Daylight Savings:           http://bugs.php.net/fix.php?id=24422&r=dst
IIS Stability:              http://bugs.php.net/fix.php?id=24422&r=isapi
Install GNU Sed:            http://bugs.php.net/fix.php?id=24422&r=gnused

Reply via email to