Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trial![](https://ecs-static.teamtreehouse.com/assets/views/marketing/shared/community-banner-white-47072046c51352fe6a69f5e691ff5700b28bb11d45197d7bdf066d9ea3f72d0c.webp)
![Matthew Stroh](https://secure.gravatar.com/avatar/1baf68b7cb0336f89c113d2c15a6f602?s=96&d=https%3A%2F%2Fecs-static.teamtreehouse.com%2Fassets%2Fcontent%2Fdefault_avatar-445fbbabfc8dc9188fb5967fe43322ee0c3e0dd1e10f378bf8343784af5a13eb.webp&r=pg)
Matthew Stroh
3,307 PointsI noticed you used <?= ?> instead of echo. I recall reading somewhere that it's not wide to use <?= instead of echo.
Is <?= acceptable for use, or is this a case of it being usable in only recent versions of PHP?
1 Answer
![Codin - Codesmite](https://uploads.teamtreehouse.com/production/profile-photos/314852/micro_11407067_10153036319003195_4804880150351378114_n.jpg)
Codin - Codesmite
8,600 PointsThere is a misunderstanding that using the short syntax for echo is bad practice. Using the short syntax for PHP tags
<?
on their own is very bad practice because it shares the same syntax as XML parsing
<?xml
It is reccomend to disable short_open_tag in PHP for this reason. Although
<?=
does not share the same syntax with xml.
In PHP 5.4+ the short syntax for echo has been seperated from short_open_tag so you can disable short_open_tag and the short syntax for echo will still function.
So in short if you are using PHP version 5.4+ it is not bad practice to use the short syntax. But if your application or website requires the use of an older version of PHP it is bad practice to use the short hand for echo.