Question: I want to write a PHP code snippet in the question or answer. I searched that but Stack Overflow can insert only HTML, CSS, JavaScript snippet code.

How can I insert a PHP code snippet like below?

JavaScript snippet example:

```js
console.log('hello world');
```

Answer: 
Stack Overflow has no features for executing live demos of PHP code in questions.

You should format a [Minimal, Reproducible Example](https://stackoverflow.com/help/minimal-reproducible-example) as a regular code block:

```
```php
<?php
    echo "123";
?>
```

```

You might additionally link to a live demo using a third-party demo hosting service. (Google finds [PHPFiddle](http://phpfiddle.org/), I can't speak to the quality of the service).
No, probably not, you should use code blocks instead as specified in the other answers.

Adding to the other answers, here are a few extra points:

* The PHP stack snippets would use up all the server CPU/RAM which would make the whole experience slightly slower for everyone
* The PHP `mail()` function could be used to send spam email to lots of people, and, again, could overwhelm the server
* You can do all sorts of destructive things with PHP, including changing databases, and even deleting files.
* Too many requests for PHP could even put Stack Overflow offline. Yikes.