Dot segments ("." and "..") are removed/collapsed and all slashes turned
into forward slashes.
php
$basePath = Path::getLongestCommonBasePath(array(
'/webmozart/css/style.css',
'/webmozart/css/..'
));
=> /webmozart
The root is returned if no common base path can be found:
php
$basePath = Path::getLongestCommonBasePath(array(
'/webmozart/css/style.css',
'/puli/css/..'
));
=> /
If the paths are located on different Windows partitions, null is
returned.
php
$basePath = Path::getLongestCommonBasePath(array(
'C:/webmozart/css/style.css',
'D:/webmozart/css/..'
));
=> null