# Question about ?> bug or feature.

- Thread: https://externals.io/message/5483
- Original archive: https://news-web.php.net/php.internals/5483
- Started by Robert Cummings on 2003-11-16T00:14:54+00:00
- Messages: 3
- Reply by email to internals@lists.php.net
- More for agents: search with https://externals.io/search.md?q={query} · JSON API at https://externals.io/api · documentation at https://externals.io/llms.txt

---

## #5483 — Robert Cummings — 2003-11-16T00:14:54+00:00

URL: https://externals.io/message/5483#5483

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 - http://www.interjinn.com |
:------------------------------------------------------------:
| 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.          |
`------------------------------------------------------------'

---

## #5484 — Jon Parise — 2003-11-16T00:26:27+00:00

URL: https://externals.io/message/5483#5484 · In reply to: #5483

> 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 (http://www.php.net/)

---

## #5485 — Andi Gutmans — 2003-11-16T06:07:24+00:00

URL: https://externals.io/message/5483#5485 · In reply to: #5483

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
