I am running a php script to find out how many python3 processes are running on my machine. I use the following code:$count = exec("pgrep -c python3")
This returns me 2 (if 2 processes are running, for example). Now I need to do mathematical operation on this output, say subtract this count from 5. When I do so and echo the output, I get nothing. I tried typecasing to int, but that won't help.
Can somebody please suggest what I am doing wrong here?