On Tue, Jul 26, 2011 at 10:39 AM, Sebastian Krebs
<sebastian.krebs.ber...@googlemail.com> wrote:
> Hi,
>
> thanks for your reply, but I'm not talking about class loading (because
> thats already possible). I'm talking about autoloading of userspace
> functions and constants
>
>
> // /path/to/my/functions.php
> namespace my\functions;
>
> const THING = 'I am constant!';
>
> function helloWorld () {
>    echo "hello World;
> }
>
> // /path/to/some/other/file.php
> namespace foo;
> use my\functions;
>
> functions\helloWorld(); // fail!
> echo functions\THING;
>
>

I think it's pretty clear what are you after.
autofunc with a patch:
http://www.mail-archive.com/internals@lists.php.net/msg43983.html

__autodefine proposal and rfc:
http://www.mail-archive.com/internals@lists.php.net/msg48986.html
https://wiki.php.net/rfc/autodefine?s[]=autodefine

from  the replies I think that the idea didn't got traction from the core devs.

-- 
Ferenc Kovács
@Tyr43l - http://tyrael.hu

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to