Re: PHP class files without <?php at the top

From: Date: Sat, 07 Apr 2012 13:32:00 +0000
Subject: Re: PHP class files without <?php at the top
References: 1  Groups: php.internals 
Request: Send a blank email to [email protected] to get a copy of this message
On Sat, Apr 07, 2012 at 09:26:01AM -0400, Tom Boutell wrote:
> Now that the flamewar has died down a little I'd like to try to have a
> civil discussion about this idea - *without* my admittedly
> inflammatory suggestion to kill <?php altogether.
> 
> So here is what I am seriously suggesting:
> 
> * The default behavior doesn't change. The parser starts out in HTML mode.
> 
> * If the CLI sees a .phpc file extension, the parser starts out in PHP
> mode (no opening <?php is required). It is still possible to shift
> into HTML mode after that with ?>.

Why ? What is the benefit ? You don't have to put <?php at the start of a php
file, so you save a few bytes...

Today PHP does not look at file extensions - so why change that behaviour ?
Extra complication with no real benefit.

Thanks for the idea - but no thanks.

> -- 
> Tom Boutell
> P'unk Avenue
> 215 755 1330

What country would that be ? On a list like this numbers should start +

-- 
Alain Williams
Linux/GNU Consultant - Mail systems, Web sites, Networking, Programmer, IT Lecturer.
+44 (0) 787 668 0256  http://www.phcomp.co.uk/
Parliament Hill Computers Ltd. Registration Information: http://www.phcomp.co.uk/contact.php
#include <std_disclaimer.h>


Thread (70 messages)

« previous php.internals (#59397) next »