its a ternary operator short circuit, see php.net "Since PHP 5.3, it is possible to leave out the middle part of the ternary operator. Expression expr1 ?: expr3 returns expr1 if expr1 evaluates to TRUE, and expr3 otherwise."
in this case if $HOME is not empty it is used (everything but windows), otherwise it uses HOMEDRIVE and HOMEPATH (windows). I put it because i wasnt sure that cygwin set the HOME env or use the windows one...