Hi James,

Yes, the DIRECTORY_SEPARATOR  constant exists for the purpose of file  
system compatibility, but it's use is only warranted in certain  
circumstances. For example, the following code will work in both Unix  
and Windows environments...

<?php include dirname(__FILE__).'/some/other/file.php'; ?>

While the following code is only compatible with Unix...

<?php if ('/' == dirname(__FILE__)) echo 'foo'; ?>

I'm suggesting those unwarranted uses of the constant be removed and  
coding standards updated to improve the readability of the codebase.  
Windows compatibility would not be affected.

Kris

On Sep 29, 2008, at 7:41 AM, James <[EMAIL PROTECTED]> wrote:

> -1
>
> In order to support windows you need to have the right directory  
> separator.  I am not a windows user, but so no reason why we  
> shouldn't support it.
>
> James
>
>
> On Sep 29, 2008, at 6:35 AM, Ian Christian wrote:
>
>>
>> 2008/9/26 Kris Wallsmith <[EMAIL PROTECTED]>:
>>> Can we update coding standards to specify use the the '/' literal
>>> rather than DIRECTORY_SEPARATOR? This would make for better
>>> readability.
>>
>> +1
>>
>>
>>
>
>
> >

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"symfony developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/symfony-devs?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to