public static function splitPath($path)
{
$parts = explode('/', $path);
return array_filter($parts, function ($parts) {
return !empty($parts) && $parts !== '.';
});
}
/** * */ public function testSplitPath() { $this->assertEquals(['a', '..', 'b'], array_values(Url::splitPath('./a/../b'))); }