What is the difference between exec (), system () and passthru ()?

6

What are the differences between these functions? Is there a specific situation to use each function? If it exists, give examples of these situations.

    
asked by anonymous 26.05.2017 / 16:22

1 answer

6

Nessa response of the OS in English, it says:

exec() - calls a system command, and you even handle the output

system() - executes a system command and shows output immediately (usually text)

passthru() - executes a command from the system, from which you want the "raw" return. Maybe in binary

I suggest you do not use any of them as it generates highly non-portable code.

Documentation

Function system
Function exec
Function passthru

    
26.05.2017 / 16:28