Page 2 of 2

Posted: Fri Jun 01, 2007 8:00 pm
by superdezign
Where's that "foot-in-mouth" smiley? :-p

Posted: Sat Jun 02, 2007 6:20 am
by Chris Corbyn
FYI, Macs are UNIX systems. They use "/" natively. It's only microsoft who decided to be different.

Posted: Sat Jun 02, 2007 7:24 am
by Ollie Saunders
It's only microsoft who decided to be different.
Grumble time! Microsoft also succeeded in standardizing the errors in JavaScript as opposed to standardizing the correct behaviour because they didn't want to break stuff and now we are forever stuck with such wonders as:

Code: Select all

alert(typeof null) // "object"

Posted: Sat Jun 02, 2007 7:31 am
by Chris Corbyn
ole wrote:
It's only microsoft who decided to be different.
Grumble time! Microsoft also succeeded in standardizing the errors in JavaScript as opposed to standardizing the correct behaviour because they didn't want to break stuff and now we are forever stuck with such wonders as:

Code: Select all

alert(typeof null) // "object"
Difting off topic, but I love this error:

"Error: Object expected. Code: 0".

Posted: Sat Jun 02, 2007 9:52 am
by RobertGonzalez
PATH_SEPARATOR - Typically ';' or ':' (though I can't really think of anything else it would be).

DIRECTORY_SEPARATOR - Typically either '\' or '/' (and again, not sure if there are others).

I think there is another one (PHP_EOL) that puts out the '\n' or '\r' or '\r\n' depending the system. Doesn't it make sense to use them when developing apps for unknown systems? Maybe I am just weird?

Posted: Sat Jun 02, 2007 4:32 pm
by maliskoleather
Everah wrote:Doesn't it make sense to use them when developing apps for unknown systems? Maybe I am just weird?
yes, but, honestly, it isnt a major nessicity to use them, with a few exceptions.

I mean, PHP natively uses the '/' as a directory separator, so its not really nessicary to use it in include paths, only when passing paths to an external program.

and really, how often does anyone use the path separator? Its not that hard to use that constant.

really, the true advantages of DIRECTORY_SEPARATOR and PHP_EOL are for saving files and passing information to other on-server programs( ie system(); ) .PATH_SEPARATOR should always be used, just for consistancy and usability among other systems