[wp-hackers] WordPress moving to PHP 5.3x?

Daniel Fenn danielx386 at gmail.com
Tue Jul 17 00:10:17 UTC 2012


What about php 3.4? Same issue?
Regards,
Daniel Fenn






On Tue, Jul 17, 2012 at 10:08 AM, scribu <mail at scribu.net> wrote:
> On Tue, Jul 17, 2012 at 2:21 AM, scribu <mail at scribu.net> wrote:
>
>> It just dawned on me that with PHP 5.3 namespaces, I wouldn't need to do
>> these crazy hacks to have a common set of functions bundled with each
>> plugin. I could just load them under that plugin's namespace only.
>>
>
> Turns out what I was thinking about isn't possible with PHP namespaces:
> *
> *
> *<?php
>
> namespace MyPlugin;
>
> require 'my-framework.php';*
>
> Unless my-framework.php also has the *namespace MyPlugin;* declaration, all
> it's functions will still be loaded in the global namespace.
>
> PHP 5.3, still a fractal of bad design.
>
> --
> http://scribu.net
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers


More information about the wp-hackers mailing list