Explain the difference between exec() vs system() vs passthru()?

Technology CommunityCategory: PHPExplain the difference between exec() vs system() vs passthru()?
VietMX Staff asked 4 years ago
  • exec() is for calling a system command, and perhaps dealing with the output yourself.
  • system() is for executing a system command and immediately displaying the output – presumably text.
  • passthru() is for executing a system command which you wish the raw return from – presumably something binary.