Trying to build a plugin – Cannot modify header information

You start the PHP code with short tags <?.
If it is on a server with short tags disabled, the PHP code is not rendered and is outputted.

Then it’s better to use complete tags <?php.

tech