I have two times in my PHP code the same 5 lines of code:

```
do_something1();
$myvar1 = something1();
do_something_else2();
$myvar2 = something2();
do_something_else3();
$myvar3 = something3();

// another code
// ...
// another code

do_something1();
$myvar1 = something1();
do_something_else2();
$myvar2 = something2();
do_something_else3();
$myvar3 = something3();

```

Would someone like this be possible to avoid repetition?

```
@BEGINNING BLAH
do_something1();
$myvar1 = something1();
do_something_else2();
$myvar2 = something2();
do_something_else3();
$myvar3 = something3();
@END BLAH

// another code
// ...
// another code

@INSERT BLAH

```

Of course, I could define a new `function`, but then here, I would have to define `global` variables (should I pre-define the variables before calling the function itself with `global`?), etc.

That's why I was looking if something shorter than a `function` existed in such situations, like a PREPROCESSOR copy/paste.