How many terminal instances are called for each exec () function call in PHP?

Posted on

Question :

If I call a file, which contains the exec() function, on two different terminals, will the second start executing only when the first one ends, or do they work independently?
    

Answer :

For each call to “exec” PHP you create a new shell instance in a Linux environment, with its own environment variables.

In Windows I think the behavior is similar.

    

Leave a Reply

Your email address will not be published. Required fields are marked *