SGML Style

Author Topic: SGML Style  (Read 219 times)

Offline beingchinmayTopic starter

  • Trade Count: (0)
  • Semi-Newbie
  • *
  • Thank You 0
  • Posts: 33
  • Karma: 0
  • Gender: Male
  • I am Chinmay
    • Fat Cutter
SGML Style
« on: 08-24-2016, 07:05:41 »
The “classic” style of embedding PHP comes from SGML instruction processing tags. To use this method, simply enclose the PHP in <? and ?>. Here’s the “Hello world” example again:

<? echo "Hello, world"; ?>

This style, known as short tags, is the shortest and least intrusive, and it can be turned off so as to not clash with the XML PI(Process Instruction) tag in the php.ini initialization file. Consequently, if you want to write fully portable PHP code that you are going to distribute to other people (who might have short tags turned off), you should use the longer <?php ... ?> style, which cannot be turned off. If you have no intention of distributing your code, you don’t have an issue with telling people who want to use your code to turn on short tags, and you are not planning on mixing
XML in with your PHP code, then using this tag style is okay.


Related Topics

  Subject / Started by Replies Last post
0 Replies
Last post 11-03-2011, 04:39:27
by manvbf
4 Replies
Last post 08-25-2015, 05:50:53
by adlerdale
0 Replies
Last post 04-12-2013, 04:09:21
by GeorgeKappa
0 Replies
Last post 08-20-2016, 05:10:57
by beingchinmay
0 Replies
Last post 08-24-2016, 07:07:44
by beingchinmay