System calls can be very fast than using a solution built into PHP (although this is not always true, since the PHP functions themselves are built and compiled in C. Many of the basic functions and extensions of PHP are pretty fast).
Besides speed, the second factor is memory limitation. Externally called processes do not stop when the PHP restriction is per-w370>, which can be great when working with large files, for example.
In addition, some functions are simply not available in PHP itself. For example, it is not possible to simulate the ImageMagick feature set completely in PHP. The GD library does not come close to what ImageMagick has to offer.
The big, big minus is that with the help of system commands you effectively eliminate portability, which is part of the beauty of PHP. Moving an application to another server becomes a huge burden because the set of external commands must be identical - and this is not always the case, even on different Linux distributions, not to mention crossing the OS border on Windows or Unix Mac OS. I myself experienced problems with wget and ImageMagick in this regard, I am sure there are many more.
If you are working on a custom application for which you have complete control over the server environment (and deciding which servers will be purchased in the next five years), this may not be a problem. It will be one, though, if you create software that should be portable.
I personally tend to disable the feature (which will require an external dependency) rather than lose portability, but then I am very actively involved in creating portable applications. It really depends on your attention.
source share