PHPize Online  /  SQLize Online is a free online environment for quickly running, experimenting with and sharing PHP and SQL code. You can run your SQL code on top of most popular RDBMS, and run PHP code that can use the same DB. For database usage you can use pre-defined instanses of PDO ($pdo) & mysqli ($mysqli).
If you want to share your code snippets written here just share the page link.

Clear SQL code [X] Format 
Clear PHP code [X]