Kirby migration from Kirby 2.4 to Kirby 4.1

Hello,

A customer contacted me to migrate his site from a Kirby 2.4 version to Kirby 4.1. His site seems to be running under PHP 7.4 according to his information.

I asked for a copy of the site to try to make it work locally under PHP 7.4 (I use DDEV).

I get errors because I have this kind of syntax in the PHP code of the site:

<? if ($i == 1): ?>
...
<? elseif($i > 1): ?>
...
<? else: ?>
...		
<? endif ?>

Are we agreed that this <? ?> syntax has never been valid in PHP, even on older versions, or am I mistaken?

I’m starting to have doubts because this code is supposed to be a copy of his site and it works online.

You can enable these PHP short open tags in php.ini, but they are discouraged, and I’d replace them.

short_open_tag = On

Thanks Sonja, I had never encountered this syntax and was not aware of this option in php.ini