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

From: Date: Sat, 07 Apr 2012 14:58:44 +0000
Subject: Re: PHP class files without <?php at the top
References: 1 2 3 4 5 6  Groups: php.internals 
Request: Send a blank email to [email protected] to get a copy of this message
On 07/04/12 16:06, Reindl Harald wrote:
> Am 07.04.2012 16:00, schrieb Tom Boutell:
>> That's a good point too.
>>
>> I think this is a better proposal:
>>
>> include_code, require_code, and require_code_once would work just like
>> include, require and require_once, except that the parser would start
>> out in PHP mode.
> would you please leave this world in peace?

This is a much better proposal than magic-extensions,
and a backwards-compatible one.
You may not like it (I'm not convinced about it), but your
criticism here is wrong.

> what do you think happens with hundret thousands of existing
> include-files out there which are containing only HTML?
They would obviously continue working as they would be using
the old require code.
Moreover, including a HTML files is bad coding, readfile() works
much better.


> why do you simply not realize that you have way too few knowledge
> and tchnical education to partly understand the side effects
> small changes in a general behavior are having and that the
> benefit has to be a REAL LARGE ONE for everybody to accept
> the possible damage - which is not the case here
This is a backwards compatible change.
The benefit of not typing '<?php' may not be worth adding those
new require types, they would also break new scripts on old engines.
But it wouldn't have those catastrophic effects that you seem to foresee.
Care to enlighten us poor myopic souls?


> where are your proposals for bash and other unix shells
> hwo they have to work if there is a whitespace before
> #!/bin/sh? what have you got as answer there?
He is only doing a proposal for php, not for bash.

> again: please leave the world in peace with your poorly
> thought proposals - and yes this is a really polite answer
> compared with the thoughts running through my mind
> while reading your stuff
Please keep trying, it can still be improved.



Thread (70 messages)

« previous php.internals (#59412) next »