Thanks for responses.
It sounds me strange, because on my PC the same software on a server which runs PHP 8.2.0 doesn't have any problem. Could it be related to the fact that on Heliohost the DB is MariaDB, while on my PC is MySql?
The other fact is that, if I comment the instruction that causes the problem, the site functions correctly.
Thanks