Most developers will not want to do this, but putting a backdoor in your code can be useful. A backdoor can allow access to an app by bypassing the usual verification process. However, this should be implemented securely in order avoid any misuse.
Why you need a backdoor is because there is an ideal world and a real world. In the ideal world, you would create your app, deliver it and all would be well. But unfortunately in the real world, you will be required to fix issues that that crop up now and then. Fixing the problem requires understanding it, and that means you need to be logged in as a particular user (the one who came across the problem).
Implementing a backdoor password or a super user account will help you address these problems securely. Of course this is only possible if you are the sole developer on the project. For a professional environment, you need to implement something larger and more secure. That sort of backdoor is called a project management system.
With a system like that, each developer will have privileges, authorities, access limits etc. Giving these rights and taking them away is as simple as clicking on a button. This is the most secure way of implementing a backdoor on a large project. A method similar to SSH can be implemented in PHP, to grant secure backdoor access. By using the OpenSLL extension, the project management system can sign in using openssl_sign. When the when the server verifies the access using openssl_verify, the PMS system gains backdoor access.