Please note that the function might be inconsistent depending on your system.
On 2 of my systems (CentOS 7.7 and Linux Mint 18.3), setting the title will work for ps but not for top.
<?php
cli_set_process_title("sleeping-daemon");
sleep(100);
/*
*ps* returns
25072 pts/2 S 0:00 sleeping-daemon
*top* returns
25072 aurelien 20 0 285848 23256 16856 S 0.0 0.3 0:00.01 php
*/