|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2007-10-19 22:21 UTC] lars at strojny dot net
Description: ------------ A constant for the namespace separator should be defined. I would propose to define NAMESPACE_SEPARATOR to "::", similiar to DIRECTORY_SEPARATOR. PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Dec 14 19:00:01 2025 UTC |
Could help to keep a codebase cleaner and better readable. Take a look at: $path = str_replace('::', DIRECTORY_SEPARATOR, $class_name); vs. $path = str_replace(NAMESPACE_SEPARATOR, DIRECTORY_SEPARATOR, $class_name); is - in my opinion - easier to understand and better to read.