When I asked a question on Stack Overflow the other users replied me to add a live demo. But my code contains a PHP part also, and I can't see a method to add codes other than HTML, CSS and JavaScript in a code snippet. Is it possible to add demonstration of any other languages in a code snippet? If so, how is it possible?

  • 2
    i think they might be referring to making a Minimal, Complete, and Verifiable example. otherwise there are third party sites not affiliated with Stack Exchange where you can put your code up as demos.
    – Memor-X
    Commented Oct 10, 2016 at 4:59
  • 3
    This should be asked on Meta Stack Overflow. Commented Oct 10, 2016 at 6:08
  • @patrick i will ask this on meta stack over flow Commented Oct 10, 2016 at 6:12
  • 3
    Huh? Off topic? This is about Stack Snippets, which is on multiple sites on the network (even on this very site!) -- I think this is on-topic.
    – hichris123
    Commented Oct 11, 2016 at 0:09

1 Answer 1


Code snippets are a cool way to add runnable examples to the site, but you really don't have to use them (especially for languages they do not support). Just paste your code as text and indent it with four spaces. E.g.:

echo('I am a code snippet!');

If your post is tagged properly (or if you specify the language explicitly, as explained here), you'll even get some neat syntax highlighting.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .