In answer to the title... Clone recursively, install devtools, edit the source code for pocketmine, run makeserver and hey presto you have a custom phar in the devtools folder.