thebear98 Posted May 20, 2011 Share Posted May 20, 2011 Hi, I'm migrating a site from PHP4 (4.4.6) to PHP5 (5.3.5), am replacing all short open tags, and have many '<?=' opening tags to migrate as well. I saw a reference in the online docs about an equivalent '<?php=' tag, but it doesn't appear to work. What is the best way to 'find and replace' a PHP4 snippet like '<?= $var ?>' into a PHP5, non-short-open-tag equivalent? Thx, Barry Link to comment https://forums.phpfreaks.com/topic/236963--/ Share on other sites More sharing options...
kenrbnsn Posted May 20, 2011 Share Posted May 20, 2011 The short tag "<?=" is equivalent to "<?php echo", so <?=$var?> should be replaced with <?php echo $var; ?> Ken Link to comment https://forums.phpfreaks.com/topic/236963--/#findComment-1218031 Share on other sites More sharing options...
KevinM1 Posted May 20, 2011 Share Posted May 20, 2011 Simply do a find-and-replace, swapping out: <?= With: <?php echo Be sure that the new lines end in a semicolon. Link to comment https://forums.phpfreaks.com/topic/236963--/#findComment-1218032 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.