Now I don't know PHP or how exactly it fits into HTML, but I had an idea that you could run a PHP script in a Stack Snippet. Is this true, and if so could you give some examples?
This is impossible. PHP is server-side, but snippets are client-side.
5\$\begingroup\$ You could theoretically add support for server-side snippets, but I don't even want to think about that security disaster. \$\endgroup\$– orlpAug 26, 2015 at 9:00
\$\begingroup\$ There are services like repl.it that support languages like PHP, so I assume it wouldn't be impossible to make it secure. \$\endgroup\$ Aug 26, 2015 at 9:04
2\$\begingroup\$ repl.it tends to disable entire imports or groups of functions, (maybe for security?). One example is you cannot
import jsonin Python. \$\endgroup\$– mbomb007Aug 26, 2015 at 21:55