[PHP-DEV] Question about ?> bug or feature.

Ask a Question related to PHP Development, Design and Development.

  1. #1

    Default [PHP-DEV] Question about ?> bug or feature.

    Hi all,

    Could someone let me know if omission of the closing php tag from a
    source file without generating an error is a bug or a feature? I've
    always thought it a feature, but someone suggested on the general list
    that it's a bug.

    Thanks in advance,
    Rob.
    --
    ..------------------------------------------------------------.
    | InterJinn Application Framework - [url]http://www.interjinn.com[/url] |
    :------------------------------------------------------------:
    | An application and templating framework for PHP. Boasting |
    | a powerful, scalable system for accessing system services |
    | such as forms, properties, sessions, and caches. InterJinn |
    | also provides an extremely flexible architecture for |
    | creating re-usable components quickly and easily. |
    `------------------------------------------------------------'

    --
    PHP Internals - PHP Runtime Development Mailing List
    To unsubscribe, visit: [url]http://www.php.net/unsub.php[/url]

    Robert Cummings Guest

  2. Similar Questions and Discussions

    1. Feature or Bug
      I have noticed while reading these newsgroups for information that when I click on a supplied link in a post, that IE 7 will open but the web page...
    2. Feature Question: Markers
      As the answer to my previous question was a surprising but resounding NO all around, let me try this one.... It is possible to embed non-printing...
    3. Feature Question: Generic Macro Capability
      Does indesign have any support for embedded macros along the lines that Word does? 1. Is there any way to insert any non-printing text into a...
    4. feature or bug?
      Forwarding to Aspnet and Aspnet.Security. They may have run across this question before. Shel -- This posting is provided "AS IS" with no...
    5. Bug or feature in SQL SP
      Hi all. In db2diag.log I found next record 2003-07-03-13.21.46.812000 Instance:DB2 Node:000 PID:2096(db2dari.exe) TID:3144 Appid:...
  3. #2

    Default Re: [PHP-DEV] Question about ?> bug or feature.

    On Sat, Nov 15, 2003 at 07:14:54PM -0500, Robert Cummings wrote:
    > Could someone let me know if omission of the closing php tag from a
    > source file without generating an error is a bug or a feature? I've
    > always thought it a feature, but someone suggested on the general list
    > that it's a bug.
    It's really neither. It's a function of the language definition.
    '<?php' means "start interpretting the following as PHP code". '?>'
    ends the PHP interpretation. If there's no need to end the PHP
    interpretation at the end of a file and return to "normal" output
    mode, then the trailing '?>' is extraneous.

    --
    Jon Parise (jon@php.net) :: The PHP Project ([url]http://www.php.net/[/url])

    --
    PHP Internals - PHP Runtime Development Mailing List
    To unsubscribe, visit: [url]http://www.php.net/unsub.php[/url]

    Jon Parise Guest

  4. #3

    Default Re: [PHP-DEV] Question about ?> bug or feature.

    At 07:14 PM 11/15/2003 -0500, Robert Cummings wrote:
    >Hi all,
    >
    >Could someone let me know if omission of the closing php tag from a
    >source file without generating an error is a bug or a feature? I've
    >always thought it a feature, but someone suggested on the general list
    >that it's a bug.
    It's a feature.

    Andi

    --
    PHP Internals - PHP Runtime Development Mailing List
    To unsubscribe, visit: [url]http://www.php.net/unsub.php[/url]

    Andi Gutmans Guest

  5. #4

    Default Re: [PHP-DEV] Question about ?> bug or feature.

    It's actually quite beneficial to leave it off in included files.
    Trailing carriage returns will not mess things up for any headers that
    might be sent after the include if you leave off the closing ?>

    -Rasmus

    On Sat, 15 Nov 2003, Jon Parise wrote:
    > On Sat, Nov 15, 2003 at 07:14:54PM -0500, Robert Cummings wrote:
    >
    > > Could someone let me know if omission of the closing php tag from a
    > > source file without generating an error is a bug or a feature? I've
    > > always thought it a feature, but someone suggested on the general list
    > > that it's a bug.
    >
    > It's really neither. It's a function of the language definition.
    > '<?php' means "start interpretting the following as PHP code". '?>'
    > ends the PHP interpretation. If there's no need to end the PHP
    > interpretation at the end of a file and return to "normal" output
    > mode, then the trailing '?>' is extraneous.
    >
    >
    --
    PHP Internals - PHP Runtime Development Mailing List
    To unsubscribe, visit: [url]http://www.php.net/unsub.php[/url]

    Rasmus Lerdorf Guest

  6. #5

    Default Re: [PHP-DEV] Question about ?> bug or feature.

    On Sun, 2003-11-16 at 01:23, Rasmus Lerdorf wrote:
    > It's actually quite beneficial to leave it off in included files.
    > Trailing carriage returns will not mess things up for any headers that
    > might be sent after the include if you leave off the closing ?>
    That's what I thought. Thanks guys, that's a fantastic feature :)

    Cheers,
    Rob.
    --
    ..------------------------------------------------------------.
    | InterJinn Application Framework - [url]http://www.interjinn.com[/url] |
    :------------------------------------------------------------:
    | An application and templating framework for PHP. Boasting |
    | a powerful, scalable system for accessing system services |
    | such as forms, properties, sessions, and caches. InterJinn |
    | also provides an extremely flexible architecture for |
    | creating re-usable components quickly and easily. |
    `------------------------------------------------------------'

    --
    PHP Internals - PHP Runtime Development Mailing List
    To unsubscribe, visit: [url]http://www.php.net/unsub.php[/url]

    Robert Cummings Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139