ID: 30506 Comment by: rakaur at malkier dot net Reported By: rintaun at projectxero dot net Status: Feedback Bug Type: Feature/Change Request PHP Version: Irrelevant New Comment:
If PHP already does that, then what he's asking for is likely namespaces. I've always used PHP as a "quick hack" for some Web stuff; however, people producing non-Web programs and/or large-scale Web projects would probably appreciate something like namespaces to better organize. Pretty much every major scripting language around has some concept of namespaces. Of course, this could be worked around by wrapping classes around everything in included files, but that's not a true namespace. Previous Comments: ------------------------------------------------------------------------ [2004-11-09 14:45:54] [EMAIL PROTECTED] Sure, but PHP already does that. It does not do anything with importing text, it imports the symbols from the script that runs... I still don't get it here... ------------------------------------------------------------------------ [2004-11-09 14:34:43] rakaur at malkier dot net Symbolic includes import the symbol table for the given namespace into the current namespace (such as in Python, Perl, D, Ruby, Java, etc) instead of textually replacing the include call with the file's contents. You more commonly see this used with `import` rather than `include`. Since PHP has no notion of namespaces or cleanliness (it just throws everything into one big namespace) I don't see how this would be accomplished without some semi-large changes to the way the language works. Perhaps something like Perl's `use` (which imports the namespace into the current namespace, but doesn't do a textual include) versus Pelr's `require` (which requires you to access the namespace seperately via `$Namespace::`). Another way to compare/contrast would be Python's `import' versus `from <something> import <something`. The former requires the use of a new namespace, the latter imports symbols into the current namespace. I hope that answers some questions. ------------------------------------------------------------------------ [2004-11-09 13:11:00] [EMAIL PROTECTED] And me neither... ------------------------------------------------------------------------ [2004-11-09 10:10:38] [EMAIL PROTECTED] Personally I can't understand what are you talking about. ------------------------------------------------------------------------ [2004-11-09 09:45:16] rintaun at projectxero dot net PHP uses text includes, ie. it simply replaces the include() call with the file that is being included. However, symbolic includes are included.. well, symbolically. ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/30506 -- Edit this bug report at http://bugs.php.net/?id=30506&edit=1