Execute a command when raspberry reboot/power on

Not really related to Home Assistant but…
What is the best way to execute a php script (command: php ./script.php) every time raspberry switch on / reboot?
Script must be visible… So i need to lauch terminal to execute it because if i connect with VNC i need to see terminal open that echoes what my script want.

Another question is… I think i must enable autologin (UI)…?

sudo crontab -e
add a line at the bottom:
@reboot [command goes here]

(without the square brackets obviously)