Updated: 28 September 2026 · Applies to: cPanel & WHM 138, PHP 8.1 to 8.4
PHP has two short tags:
<?=(short echo):<?= $name ?>is the same as<?php echo $name; ?>. It is always available and safe to use.<?(short open tag): depends on theshort_open_tagsetting, which is off in the recommended production php.ini. Code that uses it may show up as plain text on servers where it is off.
Recommendation
Use <?php to open PHP code and <?= for short output. To fix old code, replace <? with <?php (check <?xml lines separately).
Turn short_open_tag on (only for old code)
- In cPanel, open Software › MultiPHP INI Editor.
- Choose Editor Mode and select your domain.
- Add
short_open_tag = Onand click Save.
On a VPS without cPanel, set it in php.ini (php --ini shows where) and restart PHP-FPM.
Check the current setting
Create a file with <?php var_dump(ini_get("short_open_tag")); and open it in your browser: string(1) "1" means on, an empty string means off. Delete the file afterwards.