Discussion:
php -v
Baki Goxhaj
2013-11-07 16:29:19 UTC
Permalink
Hi guys,

Are there any plans to upgrade the minimum required version of PHP in WP? I
think we are falling a little behind.

What's the word on that?

Kindly,

Baki Goxhaj
about.me/banago
Abdussamad Abdurrazzaq
2013-11-07 16:38:07 UTC
Permalink
Far too many people are still on 5.2:

http://wordpress.org/about/stats/
Post by Baki Goxhaj
Hi guys,
Are there any plans to upgrade the minimum required version of PHP in WP? I
think we are falling a little behind.
What's the word on that?
Kindly,
Baki Goxhaj
about.me/banago
_______________________________________________
wp-hackers mailing list
http://lists.automattic.com/mailman/listinfo/wp-hackers
Baki Goxhaj
2013-11-07 16:43:32 UTC
Permalink
That graph is very outdated. Look here instead:
http://w3techs.com/technologies/details/pl-php/5/all

Because I use a small class on my themes that requires 3.5, I've asked 10+
clients to upgrade PHP to more then 5.2 and the good news is all of them
have done so with no issue at all. It seems people still use 5.2 in many
hosts because that was pre-selected 3-4 years ago when the signed up.

I think WordPress can make a difference in this sphere by requiring at
least 5.3.

Kindly,

Baki Goxhaj
about.me/banago


On Thu, Nov 7, 2013 at 5:38 PM, Abdussamad Abdurrazzaq <
Post by Abdussamad Abdurrazzaq
http://wordpress.org/about/stats/
Post by Baki Goxhaj
Hi guys,
Are there any plans to upgrade the minimum required version of PHP in WP? I
think we are falling a little behind.
What's the word on that?
Kindly,
Baki Goxhaj
about.me/banago
_______________________________________________
wp-hackers mailing list
http://lists.automattic.com/mailman/listinfo/wp-hackers
_______________________________________________
wp-hackers mailing list
http://lists.automattic.com/mailman/listinfo/wp-hackers
Coen Jacobs
2013-11-07 16:45:20 UTC
Permalink
If you compare those two graphs it might look outdated, it is actually not.
The difference between the two graphs is that the one on wordpress.org is
the PHP version on servers running WordPress. The one you linked to is the
web in general.
Post by Baki Goxhaj
http://w3techs.com/technologies/details/pl-php/5/all
Because I use a small class on my themes that requires 3.5, I've asked 10+
clients to upgrade PHP to more then 5.2 and the good news is all of them
have done so with no issue at all. It seems people still use 5.2 in many
hosts because that was pre-selected 3-4 years ago when the signed up.
I think WordPress can make a difference in this sphere by requiring at
least 5.3.
Kindly,
Baki Goxhaj
about.me/banago
On Thu, Nov 7, 2013 at 5:38 PM, Abdussamad Abdurrazzaq <
Post by Abdussamad Abdurrazzaq
http://wordpress.org/about/stats/
Post by Baki Goxhaj
Hi guys,
Are there any plans to upgrade the minimum required version of PHP in
WP?
Post by Abdussamad Abdurrazzaq
Post by Baki Goxhaj
I
think we are falling a little behind.
What's the word on that?
Kindly,
Baki Goxhaj
about.me/banago
_______________________________________________
wp-hackers mailing list
http://lists.automattic.com/mailman/listinfo/wp-hackers
_______________________________________________
wp-hackers mailing list
http://lists.automattic.com/mailman/listinfo/wp-hackers
_______________________________________________
wp-hackers mailing list
http://lists.automattic.com/mailman/listinfo/wp-hackers
Justas Butkus
2013-11-07 16:53:20 UTC
Permalink
Post by Coen Jacobs
If you compare those two graphs it might look outdated, it is actually not.
The difference between the two graphs is that the one on wordpress.org is
the PHP version on servers running WordPress. The one you linked to is the
web in general.
Is it possible that significant number of sites running PHP 5.2 are on
just a few big hosting providers, who run PHP 5.2 allegedly for
compatibility reasons, and receiving request from their customers would
update to more up-to date versions of PHP, which would allow for them to
save resources (i.e. do to more effective caching in PHP 5.5) and/or
allow greater developments of the web in general?
--
Regards,
Justas Butkus
J.D. Grimes
2013-11-07 17:04:48 UTC
Permalink
I’ve often thought that the lead devs should just announce that support for 5.2 will be dropped by a certain date, and see what happens.
Post by Coen Jacobs
If you compare those two graphs it might look outdated, it is actually not.
The difference between the two graphs is that the one on wordpress.org is
the PHP version on servers running WordPress. The one you linked to is the
web in general.
Is it possible that significant number of sites running PHP 5.2 are on just a few big hosting providers, who run PHP 5.2 allegedly for compatibility reasons, and receiving request from their customers would update to more up-to date versions of PHP, which would allow for them to save resources (i.e. do to more effective caching in PHP 5.5) and/or allow greater developments of the web in general?
--
Regards,
Justas Butkus
_______________________________________________
wp-hackers mailing list
http://lists.automattic.com/mailman/listinfo/wp-hackers
Matt Sowden
2013-11-07 17:08:12 UTC
Permalink
I don't think it hurts in any way to stay on 5.2 right now honestly, seeing as if you want to upgrade to 5.3 it can be done with no issue, as stated earlier. It'll cause more problems than it will solve, if it even solves any.

Minimum != Required

Best,
Matthew C. Sowden
+MattSowden
@mattsowden

-----Original Message-----
From: wp-hackers [mailto:wp-hackers-***@lists.automattic.com] On Behalf Of J.D. Grimes
Sent: Thursday, November 07, 2013 12:05 PM
To: wp-***@lists.automattic.com
Subject: Re: [wp-hackers] php -v

I’ve often thought that the lead devs should just announce that support for 5.2 will be dropped by a certain date, and see what happens.
Post by Coen Jacobs
If you compare those two graphs it might look outdated, it is actually not.
The difference between the two graphs is that the one on
wordpress.org is the PHP version on servers running WordPress. The
one you linked to is the web in general.
Is it possible that significant number of sites running PHP 5.2 are on just a few big hosting providers, who run PHP 5.2 allegedly for compatibility reasons, and receiving request from their customers would update to more up-to date versions of PHP, which would allow for them to save resources (i.e. do to more effective caching in PHP 5.5) and/or allow greater developments of the web in general?
--
Regards,
Justas Butkus
_______________________________________________
wp-hackers mailing list
http://lists.automattic.com/mailman/listinfo/wp-hackers
_______________________________________________
wp-hackers mailing list
wp-***@lists.automattic.com
http://lists.automattic.com/mailman/listinfo/wp-hackers
Justas Butkus
2013-11-07 17:10:47 UTC
Permalink
Post by J.D. Grimes
I’ve often thought that the lead devs should just announce that support for 5.2 will be dropped by a certain date, and see what happens.
Optionally using big red box in admin notification area and suggesting
that next minimum supported version will be PHP 5.5.

Actually, with our plugin (All-in-One Event Calendar) we see a bit
different numbers (there might be some skew):
- more than 55% are using WordPress 3.6.1 or earlier;
- more than 20% are using PHP 5.2.x or earlier.
Sure it says little about WordPress in general, but that's mostly why I
am interested, whereas WordPress maintainers has some chance to see, if
there might be few major players in hosting using old versions.
--
Justas Butkus
John Blackbourn
2013-11-07 18:23:41 UTC
Permalink
There has been discussion on this in various places over recent months and
years.

There is little argument in favour of raising the minimum required PHP
version to 5.3 because of the limited increase in features that it provides
over 5.2 (namespacing and closures being the main ones). This is not enough
of a feature set to warrant raising the minimum PHP version (closures would
provide no benefit to WordPress, and I love namespacing but we've survived
this long without it).

Rather than asking "Are there any plans to upgrade the minimum required
version of PHP in WP?", the question should be "If we raise the minimum
required version of PHP, will it give us enough benefit to warrant the
raise?"

So if we're talking about raising the minimum required PHP version, there
has to be a solid case for it. What benefits would we get by moving to PHP
5.3, 5.4 or 5.5? 5.4 gives us traits, but not a lot else besides various
shorthand syntaxes. 5.5 gives us generators and a new password API.

Does this list of features provide enough of a benefit to WordPress to
warrant raising the minimum required version? Are the performance
improvements in these versions enough of a benefit on their own? (They may
well be.)

When we moved from PHP 4 to PHP 5(.2) the benefit was substantial because
of the changes in the object model (visibility, abstract classes, magic
methods, autoloading) and probably other things I've not thought of. The
benefits that 5.3-5.5 provide over these are lesser in comparison.

There was some mention recently of another drive aimed at getting hosts to
update their PHP versions, similar to the GoPHP5 initiative back yonder. I
can't see this happening though.

John
Post by J.D. Grimes
I’ve often thought that the lead devs should just announce that support
Post by J.D. Grimes
for 5.2 will be dropped by a certain date, and see what happens.
Optionally using big red box in admin notification area and suggesting
that next minimum supported version will be PHP 5.5.
Actually, with our plugin (All-in-One Event Calendar) we see a bit
- more than 55% are using WordPress 3.6.1 or earlier;
- more than 20% are using PHP 5.2.x or earlier.
Sure it says little about WordPress in general, but that's mostly why I am
interested, whereas WordPress maintainers has some chance to see, if there
might be few major players in hosting using old versions.
--
Justas Butkus
_______________________________________________
wp-hackers mailing list
http://lists.automattic.com/mailman/listinfo/wp-hackers
Thomas Scholz
2013-11-07 18:42:19 UTC
Permalink
John Blackbourn,
Post by John Blackbourn
There is little argument in favour of raising the minimum required PHP
version to 5.3 because of the limited increase in features that it provides
over 5.2 (namespacing and closures being the main ones).
The most important “features” is that you cannot disable SPL in 5.3
anymore. With 5.3 we could use real auto-loaders (performance!),
iterators, default interfaces like Countable and so on.

Even WordPress core would benefit from that: one of the most used
functions—add_filter()—could rely on spl_object_hash(), and we could
finally drop the current terrible workaround.

Just extend Browse Happy with a notice about the outdated PHP version for
the next two major WP versions, and 5.2 will vanish very soon.

The WP stats don’t differentiate between abandoned WP installations (still
on old WP versions) and those which are kept up to date. The real impact
of a 5.3 requirement would hit much less users than the simple diagram
suggests.

The latest required PHP version should always be one still receiving
security updates by PHP. 5.2 is and will stay insecure. In my opinion, the
current requirements hurt our users.

Thomas
Nashwan Doaqan
2013-11-07 18:48:17 UTC
Permalink
1+, to require PHP 5.3.x as a minimum version.

It make a big difference for us as plugin developers, we will could use all
PHP 5.3 features without worrying about the compatibility problems!

I ask all of my clients to upgrade the PHP version to PHP 5.3 and no one
have a problem with that.. most good hosts have a 'PHP Version Select' in
the cPanel.
Post by John Blackbourn
There has been discussion on this in various places over recent months and
years.
There is little argument in favour of raising the minimum required PHP
version to 5.3 because of the limited increase in features that it provides
over 5.2 (namespacing and closures being the main ones). This is not enough
of a feature set to warrant raising the minimum PHP version (closures would
provide no benefit to WordPress, and I love namespacing but we've survived
this long without it).
Rather than asking "Are there any plans to upgrade the minimum required
version of PHP in WP?", the question should be "If we raise the minimum
required version of PHP, will it give us enough benefit to warrant the
raise?"
So if we're talking about raising the minimum required PHP version, there
has to be a solid case for it. What benefits would we get by moving to PHP
5.3, 5.4 or 5.5? 5.4 gives us traits, but not a lot else besides various
shorthand syntaxes. 5.5 gives us generators and a new password API.
Does this list of features provide enough of a benefit to WordPress to
warrant raising the minimum required version? Are the performance
improvements in these versions enough of a benefit on their own? (They may
well be.)
When we moved from PHP 4 to PHP 5(.2) the benefit was substantial because
of the changes in the object model (visibility, abstract classes, magic
methods, autoloading) and probably other things I've not thought of. The
benefits that 5.3-5.5 provide over these are lesser in comparison.
There was some mention recently of another drive aimed at getting hosts to
update their PHP versions, similar to the GoPHP5 initiative back yonder. I
can't see this happening though.
John
Post by J.D. Grimes
I’ve often thought that the lead devs should just announce that support
Post by J.D. Grimes
for 5.2 will be dropped by a certain date, and see what happens.
Optionally using big red box in admin notification area and suggesting
that next minimum supported version will be PHP 5.5.
Actually, with our plugin (All-in-One Event Calendar) we see a bit
- more than 55% are using WordPress 3.6.1 or earlier;
- more than 20% are using PHP 5.2.x or earlier.
Sure it says little about WordPress in general, but that's mostly why I
am
Post by J.D. Grimes
interested, whereas WordPress maintainers has some chance to see, if
there
Post by J.D. Grimes
might be few major players in hosting using old versions.
--
Justas Butkus
_______________________________________________
wp-hackers mailing list
http://lists.automattic.com/mailman/listinfo/wp-hackers
_______________________________________________
wp-hackers mailing list
http://lists.automattic.com/mailman/listinfo/wp-hackers
Nashwan Doaqan
2013-11-07 19:12:25 UTC
Permalink
In addition of what @Thomas Scholz said, We could use the Improved SPL
features in PHP 5.3 to enhance the WordPress, Right?
Post by Nashwan Doaqan
1+, to require PHP 5.3.x as a minimum version.
It make a big difference for us as plugin developers, we will could use
all PHP 5.3 features without worrying about the compatibility problems!
I ask all of my clients to upgrade the PHP version to PHP 5.3 and no one
have a problem with that.. most good hosts have a 'PHP Version Select' in
the cPanel.
Post by John Blackbourn
There has been discussion on this in various places over recent months and
years.
There is little argument in favour of raising the minimum required PHP
version to 5.3 because of the limited increase in features that it provides
over 5.2 (namespacing and closures being the main ones). This is not enough
of a feature set to warrant raising the minimum PHP version (closures would
provide no benefit to WordPress, and I love namespacing but we've survived
this long without it).
Rather than asking "Are there any plans to upgrade the minimum required
version of PHP in WP?", the question should be "If we raise the minimum
required version of PHP, will it give us enough benefit to warrant the
raise?"
So if we're talking about raising the minimum required PHP version, there
has to be a solid case for it. What benefits would we get by moving to PHP
5.3, 5.4 or 5.5? 5.4 gives us traits, but not a lot else besides various
shorthand syntaxes. 5.5 gives us generators and a new password API.
Does this list of features provide enough of a benefit to WordPress to
warrant raising the minimum required version? Are the performance
improvements in these versions enough of a benefit on their own? (They may
well be.)
When we moved from PHP 4 to PHP 5(.2) the benefit was substantial because
of the changes in the object model (visibility, abstract classes, magic
methods, autoloading) and probably other things I've not thought of. The
benefits that 5.3-5.5 provide over these are lesser in comparison.
There was some mention recently of another drive aimed at getting hosts to
update their PHP versions, similar to the GoPHP5 initiative back yonder. I
can't see this happening though.
John
Post by J.D. Grimes
I’ve often thought that the lead devs should just announce that support
Post by J.D. Grimes
for 5.2 will be dropped by a certain date, and see what happens.
Optionally using big red box in admin notification area and suggesting
that next minimum supported version will be PHP 5.5.
Actually, with our plugin (All-in-One Event Calendar) we see a bit
- more than 55% are using WordPress 3.6.1 or earlier;
- more than 20% are using PHP 5.2.x or earlier.
Sure it says little about WordPress in general, but that's mostly why I
am
Post by J.D. Grimes
interested, whereas WordPress maintainers has some chance to see, if
there
Post by J.D. Grimes
might be few major players in hosting using old versions.
--
Justas Butkus
_______________________________________________
wp-hackers mailing list
http://lists.automattic.com/mailman/listinfo/wp-hackers
_______________________________________________
wp-hackers mailing list
http://lists.automattic.com/mailman/listinfo/wp-hackers
Helen Hou-Sandi
2013-11-07 19:17:38 UTC
Permalink
To suggestions that the admin display a warning - though it sounds nice,
it's unlikely to be anything but unnecessarily scary for a user. It only
helps those who know how to upgrade their PHP version, and those who know
how to do so are rather unlikely to still be on 5.2, or 5.3 even. We can't
put the burden of what a host uses by default for a new site on a user who
didn't make that choice in the first place.
Baki Goxhaj
2013-11-07 21:02:13 UTC
Permalink
I see some folks don't see the benefits of upgrading to 5.3, but it would
be huge architecture-wise. Thomas Scholz has summarized some of the
benefits above.

WordPress has to keep the pace with the language before it becomes to dull
to work with. The developers are one of the major factors that push
WordPress forward and I would be very vigilant to keep them happy. Staying
with 5.2 for much longer is not going to make them happy for sure.

One model of upgrading the PHP version is the jQuery model. They maintain
two versions, one that supports old browsers and one that is better,
faster, modular for the new browsers. In the case of WordPress, it would be
even more easier. Let's say, WordPress 3.9 will be the last version of
WordPress to support PHP 5.2. On the other hand, WordPress 4.0 would be
5.3. The legacy version can be maintained for a long time and updated with
little features that won't hurt. And the rest of the ecosystem will be
given a superior WordPress version that will make the folks running the old
one want to upgrade. I see this as a very good strategy to make people
upgrade their PHP version.

Thoughts?

Kindly,

Baki Goxhaj
about.me/banago
Post by Helen Hou-Sandi
To suggestions that the admin display a warning - though it sounds nice,
it's unlikely to be anything but unnecessarily scary for a user. It only
helps those who know how to upgrade their PHP version, and those who know
how to do so are rather unlikely to still be on 5.2, or 5.3 even. We can't
put the burden of what a host uses by default for a new site on a user who
didn't make that choice in the first place.
_______________________________________________
wp-hackers mailing list
http://lists.automattic.com/mailman/listinfo/wp-hackers
Marko Heijnen
2013-11-07 21:41:42 UTC
Permalink
If core still can work on 5.2 then that is the requirement. It’s stupid to say that it’s 5.3 when it still can run fine on 5.2.
If you only want to have WordPress doing so because you as a plugin developer using 5.3+ functionality then the issue is on you.

If you think WordPress can gain a lot of PHP 5.3 then create a repo on GitHub and start working on those improvements and see if that works out.
Personally I would hate it when WordPress would use namespaces for example. It’s ugly to look at and make it a bit harder for the average WP developer.

In the end WordPress probably would do something like a legacy version because the upgraded will then not allow you to upgrade to the next version.
We can add features but at least we can do security fixes.

Marko
Post by Baki Goxhaj
I see some folks don't see the benefits of upgrading to 5.3, but it would
be huge architecture-wise. Thomas Scholz has summarized some of the
benefits above.
WordPress has to keep the pace with the language before it becomes to dull
to work with. The developers are one of the major factors that push
WordPress forward and I would be very vigilant to keep them happy. Staying
with 5.2 for much longer is not going to make them happy for sure.
One model of upgrading the PHP version is the jQuery model. They maintain
two versions, one that supports old browsers and one that is better,
faster, modular for the new browsers. In the case of WordPress, it would be
even more easier. Let's say, WordPress 3.9 will be the last version of
WordPress to support PHP 5.2. On the other hand, WordPress 4.0 would be
5.3. The legacy version can be maintained for a long time and updated with
little features that won't hurt. And the rest of the ecosystem will be
given a superior WordPress version that will make the folks running the old
one want to upgrade. I see this as a very good strategy to make people
upgrade their PHP version.
Thoughts?
Kindly,
Baki Goxhaj
about.me/banago
Post by Helen Hou-Sandi
To suggestions that the admin display a warning - though it sounds nice,
it's unlikely to be anything but unnecessarily scary for a user. It only
helps those who know how to upgrade their PHP version, and those who know
how to do so are rather unlikely to still be on 5.2, or 5.3 even. We can't
put the burden of what a host uses by default for a new site on a user who
didn't make that choice in the first place.
_______________________________________________
wp-hackers mailing list
http://lists.automattic.com/mailman/listinfo/wp-hackers
_______________________________________________
wp-hackers mailing list
http://lists.automattic.com/mailman/listinfo/wp-hackers
Abdussamad Abdurrazzaq
2013-11-07 16:52:54 UTC
Permalink
Hosts are loath to upgrade. Just look back at how long php 4 was around.
They don't want the customer support headache that upgrading PHP brings
them.
Post by Baki Goxhaj
http://w3techs.com/technologies/details/pl-php/5/all
Because I use a small class on my themes that requires 3.5, I've asked 10+
clients to upgrade PHP to more then 5.2 and the good news is all of them
have done so with no issue at all. It seems people still use 5.2 in many
hosts because that was pre-selected 3-4 years ago when the signed up.
I think WordPress can make a difference in this sphere by requiring at
least 5.3.
Kindly,
Baki Goxhaj
about.me/banago
On Thu, Nov 7, 2013 at 5:38 PM, Abdussamad Abdurrazzaq <
Post by Abdussamad Abdurrazzaq
http://wordpress.org/about/stats/
Post by Baki Goxhaj
Hi guys,
Are there any plans to upgrade the minimum required version of PHP in WP? I
think we are falling a little behind.
What's the word on that?
Kindly,
Baki Goxhaj
about.me/banago
_______________________________________________
wp-hackers mailing list
http://lists.automattic.com/mailman/listinfo/wp-hackers
_______________________________________________
wp-hackers mailing list
http://lists.automattic.com/mailman/listinfo/wp-hackers
_______________________________________________
wp-hackers mailing list
http://lists.automattic.com/mailman/listinfo/wp-hackers
.
Dion Hulse (dd32)
2013-11-07 23:39:10 UTC
Permalink
FWIW, I did a random sampling of some 3.7.1 API requests, and that too
showed about 50% of users on 5.2.17, which mostly agree's with
http://wordpress.org/about/stats/ (I was really hoping that PHP 5.2 was
more common amongst older versions of WordPress, but that was proved wrong)

A number of larger american hosts defaulted to PHP 5.2 a long time ago and
never forced users to update. A number of them are currently mass-migrating
users to PHP 5.3 so it'll be interesting to see how that changes the tide
in the coming months.
Post by Baki Goxhaj
http://w3techs.com/technologies/details/pl-php/5/all
Because I use a small class on my themes that requires 3.5, I've asked 10+
clients to upgrade PHP to more then 5.2 and the good news is all of them
have done so with no issue at all. It seems people still use 5.2 in many
hosts because that was pre-selected 3-4 years ago when the signed up.
I think WordPress can make a difference in this sphere by requiring at
least 5.3.
Kindly,
Baki Goxhaj
about.me/banago
On Thu, Nov 7, 2013 at 5:38 PM, Abdussamad Abdurrazzaq <
Post by Abdussamad Abdurrazzaq
http://wordpress.org/about/stats/
Post by Baki Goxhaj
Hi guys,
Are there any plans to upgrade the minimum required version of PHP in
WP?
Post by Abdussamad Abdurrazzaq
Post by Baki Goxhaj
I
think we are falling a little behind.
What's the word on that?
Kindly,
Baki Goxhaj
about.me/banago
_______________________________________________
wp-hackers mailing list
http://lists.automattic.com/mailman/listinfo/wp-hackers
_______________________________________________
wp-hackers mailing list
http://lists.automattic.com/mailman/listinfo/wp-hackers
_______________________________________________
wp-hackers mailing list
http://lists.automattic.com/mailman/listinfo/wp-hackers
Ryan McCue
2013-11-08 03:17:22 UTC
Permalink
Post by Dion Hulse (dd32)
FWIW, I did a random sampling of some 3.7.1 API requests, and that too
showed about 50% of users on 5.2.17, which mostly agree's with
http://wordpress.org/about/stats/ (I was really hoping that PHP 5.2 was
more common amongst older versions of WordPress, but that was proved wrong)
A number of larger american hosts defaulted to PHP 5.2 a long time ago and
never forced users to update. A number of them are currently mass-migrating
users to PHP 5.3 so it'll be interesting to see how that changes the tide
in the coming months.
In addition, there's a bunch of different people working with hosts to
push this forward. I hate to be opaque and not give any details, but
suffice to say that there's a few big hosts pushing forward on this now.

The PHP-FIG (Framework Interoperability Group) is looking at a new
GoPHP5-style initiative, and I'm acting as the (unofficial)
representative for WP there as well.

----

With regards to the arguments that we could rearchitecture WP to be more
modern, etc etc, that's realistically not going to happen due to
backwards compatibility concerns. I doubt we'll be switching out for
autoloaders any time soon (they have performance concerns that need to
be fully concerned, for one), for example. It's also pretty unlikely
that we start rewriting pieces of WP to use 5.3+ features.

Maintaining a separate branch for compatibility is also not a real
option. We tried it before with 2.0, and as Mark Jaquith can attest, it
sucked to manage.

As much as I'd love personally to go and rewrite a heap of WP to fit in,
it's realistically not going to happen.

The (perhaps unofficial) policy that I recall is that we can try out
5.3+ features as a sort of progressive enhancement that's only available
to 5.3+ users as a sort of enticement. As far as I know, we haven't
actually had any issues where 5.3+ would be required for a feature, or
at least that couldn't be done in a 5.2-compatible way, so there's been
no significant push there.

----

This all said, if you want to help make WP better in this regard, get in
and start helping out. I'm trying really hard to make the WP-API project
[1] a model to follow with regards to modern WP features; there's
interfaces *and* reflection! My hope is that some of the WP-API core
will end up merged into WP's core (that is, WP/WP_Query/WP_Post/etc) and
have significant effects outside just the API.

If there's specific areas of WP that you think need modernisation (and I
don't necessarily mean 5.3+ things; we still have PHP4 idioms in
places), do something about it. Mention it here if you think it's a
major issue, and we can start a discussion about it. Even better, create
a proof-of-concept patch!

[1]: https://github.com/WP-API/WP-API
--
Ryan McCue
<http://ryanmccue.info/>
Eric Mann
2013-11-08 16:36:22 UTC
Permalink
Post by Marko Heijnen
If core still can work on 5.2 then that is the requirement. It’s stupid to
say that it’s 5.3 when it still can run fine on 5.2.
You're missing the point. Core can still work on 5.2 *because* 5.2 is the
minimum requirement. It would be "stupid" to put a feature that requires
5.3 into core because it would be rejected out of hand by committers since
it would, you guessed it, make it so that core will not run on the minimum
required version.

So long as 5.2 is the minimum requirement, core will *always* run on at
least 5.2. We have to raise the requirement before we can start putting
5.3 (or 5.4 or 5.5) code into core.
Post by Marko Heijnen
FWIW, I did a random sampling of some 3.7.1 API requests, and that too showed
about 50% of users on 5.2.17
Would be nice if we could update the stats page to make this kind of
information publicly available. Would help us (developers) better target
our code and would go miles in helping to tone down the attitude of this
kind of conversation in the future.

It's also pretty unlikely that we start rewriting pieces of WP to use 5.3+
Post by Marko Heijnen
features.
Agreed. But the ability to start writing *new* features for WP using 5.3+
code features would be beneficial. I like our backwards compatibility and
it's one of the reasons WordPress is so powerful. But as we add new
features into core it would be fantastic if we could write them using, say,
namespaces to isolate the new functionality from workarounds/hacks/poor
code already present in themes and plugins that implement said features in
their own way.

The (perhaps unofficial) policy that I recall is that we can try out 5.3+
Post by Marko Heijnen
features as a sort of progressive enhancement that's only available to 5.3+
users as a sort of enticement.
This. I really like this idea. Would be fairly easy to expose a
PHP_BLEEDING or similar constant in core and use that as a switch to turn
on/off enhanced (new) features. My hesitation here is the same as Helen
pointed out earlier - most end users have no idea what PHP is, how it
works, what version they're running, or how to upgrade. By hiding new
features behind a versioned wall, we're introducing a world where WordPress
is advertised to have X feature, but when Jimmy Blogger clicks the
auto-install button on his hosting dashboard, X feature is nowhere to be
found. He'll blame WordPress, not his host, for the discrepancy.
Otto
2013-11-08 16:44:10 UTC
Permalink
Post by Dion Hulse (dd32)
Post by Dion Hulse (dd32)
FWIW, I did a random sampling of some 3.7.1 API requests, and that too
showed
Post by Dion Hulse (dd32)
about 50% of users on 5.2.17
Would be nice if we could update the stats page to make this kind of
information publicly available. Would help us (developers) better target
our code and would go miles in helping to tone down the attitude of this
kind of conversation in the future.
I'm not getting involved in this conversation, other than to say this. ;)

The data used for the graphs on the stats page are built daily, using a
random(ish) sampling of the API requests from the previous day.

What you see on that page is current and up-to-date. It's not counting
every install in the world, or months-old installs, or inactive installs
that nobody is visiting. It's built from just the API requests from the day
before.

-Otto
Baki Goxhaj
2013-11-08 16:53:38 UTC
Permalink
Perhaps to close this off for now all I have to say is this:

WordPress won't become that App platform that you can build anything on
which Matt presented as the future of WP in WPSF unless the system makes
use of the new goodness of PHP.

What would be the best route? I don't know. Does WP have to raise the bar?
Yes!

Kindly,

Baki Goxhaj
about.me/banago
Post by Otto
Post by Dion Hulse (dd32)
Post by Dion Hulse (dd32)
FWIW, I did a random sampling of some 3.7.1 API requests, and that too
showed
Post by Dion Hulse (dd32)
about 50% of users on 5.2.17
Would be nice if we could update the stats page to make this kind of
information publicly available. Would help us (developers) better target
our code and would go miles in helping to tone down the attitude of this
kind of conversation in the future.
I'm not getting involved in this conversation, other than to say this. ;)
The data used for the graphs on the stats page are built daily, using a
random(ish) sampling of the API requests from the previous day.
What you see on that page is current and up-to-date. It's not counting
every install in the world, or months-old installs, or inactive installs
that nobody is visiting. It's built from just the API requests from the day
before.
-Otto
_______________________________________________
wp-hackers mailing list
http://lists.automattic.com/mailman/listinfo/wp-hackers
Andrew Nacin
2013-11-08 17:43:31 UTC
Permalink
Post by Baki Goxhaj
WordPress won't become that App platform that you can build anything on
which Matt presented as the future of WP in WPSF unless the system makes
use of the new goodness of PHP.
Yeah, no. Nothing is preventing *you* from using newer features you enjoy.
But WordPress core will continue with its minimum requirements for some
time. As John Blackbourn summarized, there are some niceties in PHP 5.3,
5.4, and 5.5, but nothing in them provide a benefit that would outweigh
literally abandoning a half (or more) of our userbase on old software,
unable to ever update WordPress again. (FWIW, since I saw this question was
asked: I don't think it's just a few hosting companies keeping most of our
userbase on 5.2.17. Bluehost, which is huge, recently pushed their servers
from 5.2 to 5.4, and the needle barely moved.)

* short array syntax, ?:, <?=, function array dereferencing, empty()
supporting arbitrary expressions, etc. are syntactical sugar — they're
nice, but not something to abandon our users for
* generators, traits, and late static bindings are cool, but their use
cases are fairly limited, you can architect things differently to work
around the lack of them, and they're not something to abandon our users for
* closures are also cool, but they can largely be replaced by functions
and methods, and they also don't have much of a role in our hooks system
(as a closure attached to a hook can't easily be removed later)
* namespaces aren't backwards compatible so we won't be able to leverage
them much anyway
* it's about time PHP 5.5 added finally to try/catch, but we don't
currently use exceptions in WordPress
* we already use spl_object_hash() when it is available (and it basically
always is, SPL is nearly never disabled)
* we *could* do SPL autoloading for 5.3+ (and manual includes for 5.2) but
I've tried it and didn't see a performance benefit (happy to be proven
wrong)
* we already have a solid password hashing mechanism, and we'd likely just
adopt/wrap the 5.5 one at a later point

Would it be "cooler" if we could use 5.3, 5.4, and 5.5 features/syntax/etc?
Absolutely. But 5.2 isn't what PHP 4 was. It's actually pretty decent and
does the job we've asked of it. I think we've been doing this all wrong.
Pushing 5.3+ for the purposes of developer happiness isn't going to get us
anywhere. We had some PHP 5.2-only features (for example, timezone support
and oEmbed XML handling) back when our minimum requirement was PHP 4, but
as Ryan McCue pointed out, I've yet to actually see something of
consequence for which we'd need PHP 5.3+.

If it's not developer happiness, then what is it? I'd argue performance,
stability, and security. We've been leaning on hosting companies and will
continue to do so because it's going to be better for them for these
reasons. Unfortunately, a lot of other software (not named WordPress) break
terribly on 5.3 or 5.4, so the hosts are in a tough spot, as they don't
want to break sites. The rise of WordPress-specific hosts — and
WordPress-specific hosting plans within larger hosting companies — actually
improves the chances that hosting companies will move faster, because
WordPress works on all modern versions of PHP without much issue.

Nacin
Nicholas Ciske
2013-11-08 17:56:26 UTC
Permalink
Case in point -- "developer happiness" is a slippery slope:
http://alexrayu.com/blog/drupal-forked-my-take-it


_________________________
Nick Ciske
http://thoughtrefinery.com/
@nciske
Post by Andrew Nacin
If it's not developer happiness, then what is it? I'd argue performance,
stability, and security.
Gabriel Acosta
2013-11-08 19:17:15 UTC
Permalink
I would love to be part of a Wordpress fully MVC OOP fork (working over a
well stablished framework being a plus), count me in! I'm a professional
developer and I can't stand the current methodology to work with it, I'm
sorry, your ways may be more than valid but are certainly not in harmony to
what is being taught as "Modern Practices", let me repeat myself THERE
MIGHT NOT BE ANYTHING WRONG with your ways, but they're just not the ways
of must modern software projects.

To sum it up, I agree that you might not gain from a performance stand
point, but certainly you're not winning new developers either by staying as
is.
Post by Nicholas Ciske
http://alexrayu.com/blog/drupal-forked-my-take-it
_________________________
Nick Ciske
http://thoughtrefinery.com/
@nciske
Post by Andrew Nacin
If it's not developer happiness, then what is it? I'd argue performance,
stability, and security.
_______________________________________________
wp-hackers mailing list
http://lists.automattic.com/mailman/listinfo/wp-hackers
Andrew Nacin
2013-11-08 20:30:31 UTC
Permalink
Post by Gabriel Acosta
To sum it up, I agree that you might not gain from a performance stand
point, but certainly you're not winning new developers either by staying as
is.
No one is suggesting we're staying as-is. Rather, we've been evolving
fairly rapidly across the board. The argument is simply that PHP 5.2 isn't
slowing is down, and that dropping support for it won't provide any
benefit. PHP 5.2 is plenty modern for what we're aiming to do.

We added WP_Theme in 3.4 and WP_Post in 3.5. Both were used to rewrite
older code, improve performance and caching, and fix some long-standing
bugs. WP_Comment is probably next, along with WP_Term. But beyond cleanup,
they're setting the stage for us to move on exciting new things. For
example, they'll probably be decorated with methods for CRUD and other
operations. There's now a whole roadmap that outlines how we plan to remake
terms (adding meta) and possibly add post relationships — which wouldn't be
possible without these kinds of major changes:
http://make.wordpress.org/core/2013/07/28/potential-roadmap-for-taxonomy-meta-and-post-relationships/.
Here's a flash talk I gave in August that touches on how we evolve forward
without breaking sites — which includes PHP version and OOP (or whatever)
just the same: http://vip.wordpress.com/2013/09/27/nacin-wordpress-evolves/.

All I've mentioned here is bringing a little OOP to our objects. This is
just the tip of the iceberg.

Nacin
Thomas Scholz
2013-11-08 20:04:14 UTC
Permalink
Andrew Nacin,
Post by Andrew Nacin
Yeah, no. Nothing is preventing *you* from using newer features you enjoy.
That's not quite true. :)

Basic example: some API providers (Dropbox, Amazon and so on) offer PHP
classes to access their APIs. Very comfortable, because as a plugin
developer, you don't have to reinvent the wheel, and these tools are
usually better tested than a single developer could do. But if they
require at least PHP 5.3, you cannot use them.
The same applies to almost all existing frameworks and libraries: we
cannot use that code, because so many users are still on 5.2, and we don't
want to lose those.

This is not primarily about changes or new features in WP core. But by
raising the requirements, WP would offer a better environment for plugin
(and theme) authors. I think the overall code quality would be improved if
we had not to reinvent everything we need.

This process should not be scary or annoying for the users. Of course. A
short, nicely written hint would be a good start. Something like: Hey,
your site would be faster and more secure after an PHP upgrade! _How can I
do that?_ (helpful link)

Would that hurt anyone? I don't think so.

Thomas
Bryan Petty
2013-11-08 20:24:34 UTC
Permalink
Post by Thomas Scholz
Basic example: some API providers (Dropbox, Amazon and so on) offer PHP
classes to access their APIs. Very comfortable, because as a plugin
developer, you don't have to reinvent the wheel, and these tools are usually
better tested than a single developer could do. But if they require at least
PHP 5.3, you cannot use them.
The same applies to almost all existing frameworks and libraries: we cannot
use that code, because so many users are still on 5.2, and we don't want to
lose those.
None of that has anything to do with WordPress still supporting 5.2.
He was right, that doesn't mean you can't require 5.3+ in your plugins
that require those 5.3+ libraries, several plugins on WordPress.org
do.

Regards,
Bryan Petty
Andrew Nacin
2013-11-08 20:29:31 UTC
Permalink
But by raising the requirements, WP would offer a better environment for
plugin (and theme) authors.
If by better environment you mean vastly smaller user base. Feel free to
use that PHP 5.3 library, just make sure your plugin doesn't crash a 5.2
site and instead presents "a short, nicely written hint", as you suggest.
You're more than welcome to do that. WordPress will not.

Nacin
Eric Mann
2013-11-08 17:24:03 UTC
Permalink
What you see on that page is current and up-to-date. It's not counting every
install in the world, or months-old installs, or inactive installs that
nobody is visiting. It's built from just the API requests from the day
before.
Yes, and this is good to know. But when many of us are saying "old
installs" we're referring to the 94.5% of WordPress installs that are less
than the current version. 3.7.1 is out, and the 3.7.X branch only makes up
~5.5% of the version chart. How many of *those* installations are on older
versions of PHP.

According to those stats, more than a quarter of "active" sites are still
running WordPress 3.0 ... not being able to see juxtapose PHP versions and
WordPress versions makes it nearly impossible for anyone to create any sort
of conclusion based on this stats page, yet it's cited in every single "we
won't raise the minimum version" debate.
Ian Dunn
2013-11-08 17:35:17 UTC
Permalink
Post by Eric Mann
My hesitation here is the same as Helen
pointed out earlier - most end users have no idea what PHP is, how it
works, what version they're running, or how to upgrade. By hiding new
features behind a versioned wall, we're introducing a world where WordPress
is advertised to have X feature, but when Jimmy Blogger clicks the
auto-install button on his hosting dashboard, X feature is nowhere to be
found. He'll blame WordPress, not his host, for the discrepancy.
What if instead of hiding the feature, we replaced it with a short
explanation? So, if they have 5.3+ then the screen for Feature X works
like normal, but if they don't then the screen will still appear in
menus, etc, but when the user visits the page they'll see a paragraph
saying something like, "Your server is running a very old version of
PHP, and it is not capable of supporting Feature X. Please contact your
hosting company or administrator and ask them to upgrade your site to
the latest version of PHP."

That way the user would know that the feature exists, and that their
hosting company is to blame for why it doesn't work, and that the action
they need to take is to contact the host.
Andrew Nacin
2013-11-08 17:53:21 UTC
Permalink
Post by Ian Dunn
Post by Eric Mann
My hesitation here is the same as Helen
pointed out earlier - most end users have no idea what PHP is, how it
works, what version they're running, or how to upgrade. By hiding new
features behind a versioned wall, we're introducing a world where WordPress
is advertised to have X feature, but when Jimmy Blogger clicks the
auto-install button on his hosting dashboard, X feature is nowhere to be
found. He'll blame WordPress, not his host, for the discrepancy.
What if instead of hiding the feature, we replaced it with a short
explanation? So, if they have 5.3+ then the screen for Feature X works like
normal, but if they don't then the screen will still appear in menus, etc,
but when the user visits the page they'll see a paragraph saying something
like, "Your server is running a very old version of PHP, and it is not
capable of supporting Feature X. Please contact your hosting company or
administrator and ask them to upgrade your site to the latest version of
PHP."
First: as summarized in my previous post to this thread, I've yet to be
shown anything we'd want to build in 5.3+ only that we couldn't also easily
build for 5.2.

Second: Many of our users have extremely limited knowledge of their setup.
That includes not knowing what PHP is, or not realizing there is a
difference between their domain and their hosting, or not even remembering
who their host is, or being the "administrator" but having no clue about
any of this, including who to contact. It is not fair to them to present
them with a frustrating and highly technical problem and then ask them to
pass the buck to who-knows-who. We owe it to 20 percent of the Internet to
suck it up and absorb our technical debt so users don't have to. Passing on
technical problems to users is the antithesis of what we believe.

Third: But whether they do or not, we do not screw with our users like
this. WordPress is not a protest piece.

Further reading:
* http://wordpress.org/about/philosophy/
* http://ma.tt/2007/07/on-php/
* http://nacin.com/2010/09/29/on-php-redux/

Nacin
Ryan McCue
2013-11-09 03:05:56 UTC
Permalink
Post by Eric Mann
This. I really like this idea. Would be fairly easy to expose a
PHP_BLEEDING or similar constant in core and use that as a switch to turn
on/off enhanced (new) features. My hesitation here is the same as Helen
pointed out earlier - most end users have no idea what PHP is, how it
works, what version they're running, or how to upgrade. By hiding new
features behind a versioned wall, we're introducing a world where WordPress
is advertised to have X feature, but when Jimmy Blogger clicks the
auto-install button on his hosting dashboard, X feature is nowhere to be
found. He'll blame WordPress, not his host, for the discrepancy.
To be clear, I was thinking more of behind-the-scenes developer-focused
features. Making use of performance enhancements where possible (ala
spl_object_hash()) and the like that still have a fallback, even if that
fallback isn't that great. Maybe even advanced APIs, but that's sort of
on the edge.

Introducing user-focused features that don't work with all WP installs
would be an incredibly bad idea.
--
Ryan McCue
<http://ryanmccue.info/>
Continue reading on narkive:
Loading...