[wp-hackers] wp_remote_request not telling me the 301'd URL

Edward de Leau e at leau.net
Fri Mar 11 21:49:27 UTC 2011


1. backslashes are ugly : yes i posted the same blogcomments on it grin but
... at least they are now here. And they are really
needed functionality despite the look. Prefixes are there because PHP did
not have namespaces like other programming
languages. Seriously : ask plugin writers to create a unique prefix in front
of EVERY class and global ?? That is probably
even more uglier than the backslash :). A C# or Java developer would think
wtf. That is a workaround
for simply namespace \com\google\pluginA at the top of every file. Compare
phpdoc @package WordPress and @package whatever in plugins. That is the same
principle.

Without namespaces (the thousands of plugins and themes around WordPress *
the amount of classes, functions and globals etc.. ) = tens of thousands of
objects (!!) they use are in potential danger of naming conflicts..... with
namespaces... there is none (if people use their domain as part of the
namespace).

2. only supported in 5.3 and upwards: I think that is a host problem.
{ many hosts do support 5.3 but it requires a line in the .htaccess to use
that bin dir}
PHP 5.3 ... uhm what 2/3 years old? IF 85% of the hosts are now on 5.2 then
probably the majority of them have a
switch to try 5.3 from another bin. If people don't use that switch its
probably because there was no reason to. If they
find a plugin that needs it they turn on the switch, so I think that is a
bit chicken and egg. But you are right the plugin will
have a smaller audience. Then again by the time it is out of beta we are on
php 7.5 :)


On Fri, Mar 11, 2011 at 10:12 PM, Otto <otto at ottodestruct.com> wrote:

> On Fri, Mar 11, 2011 at 3:06 PM, Edward de Leau <e at leau.net> wrote:
> > Thanks for the comments, need to do work on it :)
> >
> > 1)     .....  I DO prefix: see line 1: namespace leau\co\wp_favicons; (!)
> >  that is why namespaces have been created :)
> >
> >  (makes it easy to create the plugins)
>
> Ugh. Using namespaces in PHP is bad mojo. Mostly because PHP defined
> them to be as ugly as possible (seriously, backslashes?), but mainly
> because PHP versions under 5.3.0 don't support them. WordPress is only
> upping the requirement to PHP 5.2, and as you can see from the stats,
> 85% of people are running 5.2: http://wordpress.org/about/stats/
>
> -Otto
> _______________________________________________
> 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