RunaAsService won't notice that.
I'm running php script with your service and if my script should exit, runasservice won't restart it. Also if php has terminated runasservice service won't stop anymore if I try through services console.
And if I stop runasservice service, my php script keeps running.
Features like those would be nice...