#43046 [Fbk->Opn]: Cleaner code, improved readability

From: Date: Fri, 19 Oct 2007 22:40:13 +0000
Subject: #43046 [Fbk->Opn]: Cleaner code, improved readability
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-118744@lists.php.net to get a copy of this message
ID: 43046 User updated by: lars at strojny dot net -Summary: Correcting version Reported By: lars at strojny dot net -Status: Feedback +Status: Open Bug Type: Feature/Change Request Operating System: Gentoo Linux PHP Version: 5.3CVS-2007-10-19 (snap) New Comment: 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. Previous Comments: ------------------------------------------------------------------------ [2007-10-19 22:32:22] lars at strojny dot net Sorry, wrong version. ------------------------------------------------------------------------ [2007-10-19 22:30:18] derick@php.net Why is this useful? ------------------------------------------------------------------------ [2007-10-19 22:21:59] 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. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=43046&edit=1

« previous php.bugs (#118744) next »