PEAR is archived and read-only

This mirror preserves historical PEAR package releases and metadata so existing references remain available.

Home » Date and Time » Date » Bug #6633

Missing ?> at the end of files

Details

Submitted2006-01-30 17:20 UTC
Frommattsch at gmail dot com
Assignedpajoye
StatusBogus
PackageDate
PHP VersionIrrelevant
OSGentoo
Roadmaps(Not assigned)

Comments

[2006-01-30 17:20 UTC] mattsch at gmail dot com

Description:
------------
It's a little hard to execute php files when you're missing ?> at the end of the file.

Test script:
---------------
?>

Expected result:
----------------
It runs.

Actual result:
--------------
Doesn't run.

[2006-01-31 03:38 UTC] mattsch at gmail dot com

What? I thought it was pretty self explanatory. These are the files specifically which have NO closing PHP tag ( ?> ) on 1.4.6:

Human.php
Span.php
TimeZone.php

[2006-01-31 16:16 UTC] mattsch at gmail dot com

If they're not necessary, why were they there in previous versions of those templates and for that matter, why are they in the other templates? Seems like lazy programming to me.

[2006-01-31 17:05 UTC] mattsch at gmail dot com

So why not avoid white characters at the end of the file? They were also there in previous versions, why were they taken out? At any rate, I can't find any documentation that specifically says that the ending tag is optional:

http://us3.php.net/basic-syntax

[2006-01-31 17:08 UTC] mattsch at gmail dot com

Never mind. I found it: http://us3.php.net/manual/en/language.basic-syntax.instruction-separation.php

Ok, in this case, at least be consistent and not include it in the calc.php file.