September 22, 2014
this code never end

import std.stdio;
import std.file;
import std.parallelism : parallel;
import std.algorithm : filter;

void main(string[] args)
{
    foreach(d; parallel(args[1 .. $], 1))
    {
        auto phpFiles = filter!`endsWith(a.name,".php")`(dirEntries(d,SpanMode.depth));
        writeln(phpFiles);
    }
}
September 22, 2014
On Monday, 22 September 2014 at 11:25:53 UTC, Daniel Kozak wrote:
> this code never end
>
> import std.stdio;
> import std.file;
> import std.parallelism : parallel;
> import std.algorithm : filter;
>
> void main(string[] args)
> {
>     foreach(d; parallel(args[1 .. $], 1))
>     {
>         auto phpFiles = filter!`endsWith(a.name,".php")`(dirEntries(d,SpanMode.depth));
>         writeln(phpFiles);
>     }
> }

Works for me.

Be aware that dirEntries traverses the whole directory structure
recursively. So when you let it loose on something like root or
your home directory, it may take a while.

If that's not it, try to define a complete test scenario:
directories, files, compiler version, command line for compiling,
command line for running, etc.