Re: Re: Disabling PHP tags by php.ini and CLI options

From: Date: Fri, 13 Apr 2012 02:00:33 +0000
Subject: Re: Re: Disabling PHP tags by php.ini and CLI options
References: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19  Groups: php.internals 
Request: Send a blank email to internals+get-59844@lists.php.net to get a copy of this message
Hi, 2012/4/13 Yasuo Ohgaki <yohgaki@ohgaki.net>: > Hi, > > 2012/4/13 Stas Malyshev <smalyshev@sugarcrm.com>: >> Hi! >> >>> If I exclude current code, then introducing script only include will be >>> preferred one. I preferred dedicated statement for it though. >>> >>> include >>> include_once >>> require >>> require_once >>> script >>> script_once >> >> I have a thought here. To implement script/script_once you don't need it >> to be a language construct. A function would do just as fine. Why not >> make an extension having these two functions, put it on PECL and see if >> people will be using it? >> For extreme adopters, you could even make php.ini switch that overrides >> include/require and redirects them to your script functions. Shouldn't >> be impossible to do, I think. > > Good idea. > > I think it's possible as a Zend engine module. It may be possible > as normal module if compiler hook can be used. I guess it is now. > > It provides optional security by accident. (Someone called  LFI syntax > error an accident and I like it) I wish the other RFC author > implement this. > > Regards, I just briefly read tokenizer code. We can simply scan tokens and validate then executes. So it's a very simple module to write. Regards, -- Yasuo Ohgaki yohgaki@ohgaki.net

« previous php.internals (#59844) next »