Both of them have their own advantages and disadvantages. Shell is a built-in command of the Linux operating system. It has higher permissions and can directly implement many system-level functions, but the debugging is cumbersome and the syntax is not easy to read. I preferred to give more functions to PHP to implement.
A solution of case of mobile data runs slinkingly