|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2012-03-06 06:39 UTC] cornelius dot howl at gmail dot com
Description: ------------ Really hope there is a DS alias for DIRECTORY_SEPARATOR, and PATH_SEPARATOR. because it's too easy to make a typo, these keywords are hard to type. $path = 'root' . DS . 'to' . 'path' . DS . 'subpath' . DS . 'subpath' . DS . 'file.txt'; rather than: $path = 'root' . DIRECTORY_SEPARATOR . 'to' . 'path' . DIRECTORY_SEPARATOR . 'subpath' . DIRECTORY_SEPARATOR . 'subpath' . DIRECTORY_SEPARATOR . 'file.txt'; the later is uglier. PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Oct 29 02:00:01 2025 UTC |
Constants should have clear names to help readability. If you want something shorter you can easily do const DS = DIRECTORY_SEPARATOR; or using define(). If you have issue typing names correctly you can also get an IDE.