I’ve inherited an existing php web site. The file names end with the php extension and the code appears to be php.
Just wondering why the opening file declaration is “<?” instead of “<?php".
What is the difference between the 2 and why would one be used over the other.
Thanks!
It’s called PHP short tags. If short tags is enabled the two notations are equivalent, but short tags can be disabled on some servers so it’s usually best to write the tag in full in you are in doubt.
The documentation has this to say: