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).
If you understand the difference between client- and server-side code and the security implications thereof, you will understand why this is not, and probably never will be, a feature on Stack Overflow.