Re: PHP proposal on modular systems

From: Date: Thu, 20 Feb 2014 15:48:50 +0000
Subject: Re: PHP proposal on modular systems
References: 1 2 3 4 5 6 7 8 9 10 11  Groups: php.internals 
Request: Send a blank email to internals+get-72710@lists.php.net to get a copy of this message
On Fri, Feb 14, 2014 at 2:09 PM, Kevin Ingwersen <ingwie2000@googlemail.com>wrote: > If we could just override the require function, so we would be able to > mimic the behavior of pytons import, and nodejs’ require. Porting the > architecture is rather easy, but without being able to override functions > such as require, this is going to be harder. > Actually, this is an idea for an RFC i was thinking about… o.o; Thing is > just, I dont know how to mod the core to allow overriding of the require > function. > > Kind regards. > Am Fr. Feb. 14 2014 13:53:37 schrieb Giuseppe Ronca: > > hi, we prefer bottom (or inline posting with proper truncation of the quoted messages) posting on the php.net mailing lists, please try to follow our mailing list rules when sending a mailt to the list: https://github.com/php/php-src/blob/master/README.MAILINGLIST_RULES if require would be a function, one could use tricks provided by the runkit extension: http://www.php.net/manual/en/function.runkit-function-rename.php but require and variations aren't functions, but language constructs, which means that introducing redirection would be a bit more tricky, plus we also have to consider, that any additional logic to those keywords would slow down the execution for every user. -- Ferenc Kovács @Tyr43l - http://tyrael.hu

« previous php.internals (#72710) next »