php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #43048 Interface should be allowed as a valid class name
Submitted: 2007-10-19 22:54 UTC Modified: 2007-10-20 14:48 UTC
From: lars at strojny dot net Assigned:
Status: Not a bug Package: Feature/Change Request
PHP Version: 5.3CVS-2007-10-19 (snap) OS: Gentoo Linux
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: lars at strojny dot net
New email:
PHP Version: OS:

 

 [2007-10-19 22:54 UTC] lars at strojny dot net
Description:
------------
When an application, which uses Company_Component_Interface as a current naming scheme, is ported to the new namespace support, it would not be possible to use the following:
<?php
namespace Company::Component;
interface Interface
{
...
}
This is because interface (or Interface) is a reserved keyword. It would be really helpful, if Interface would be an allowed class name.


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2007-10-20 13:29 UTC] lars at strojny dot net
Same goes for Abstract, btw. Because something like MyCompany::Component::Abstract should be possible.
 [2007-10-20 14:48 UTC] johannes@php.net
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php

Keywords can'T be used as identifier.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Wed May 29 12:01:32 2024 UTC