Internaleers!
We seem to have a few things being discussed at the moment that are
somewhat beyond the scope of the sorts of changes we've been adding
since 5.3. (I think the new release and voting processes have
generally worked well here, incidentally: 5.4 and 5.5 have both been
releases with a good range of new features, yet haven't caused
significant pain in terms of BC and have been pretty stable.) Things
that fall into that category for me include:
- size_t and int changes.
- Generics.
- Function and method naming rationalisation (whether through
aliasing existing functions, or adding a new API through enabling
method calls on scalar variables). - Dare I say it, better multibyte encoding handling. (I don't want to
repeat the PHP 6 experience, but I'm also not sold on mbstring-ng
being the ultimate solution.) - Named arguments.
- Unbundling of ext/mysql and removal of features deprecated in 5.4 and 5.5.
These all involve significant changes to writing PHP code and/or
extensions — while some have no real BC implications, they are likely
to change the best practice for writing and structuring PHP code.
So here's my question: should we be starting to lay out a rough
schedule and list of desired features for a new major release? (I'm
going to call it 5++, since the actual number is controversial; I'd
prefer 7, but I know there's a school of thought that 6 is usable
again. Whatever. We can bikeshed that down the track.)
Since I'm not usually shy about giving my opinion, here's how I think
we could do it:
Now until June 2014: test and release 5.6 as planned.
Post-5.6: branch a 5.x-master and use master for 5++.
Second half of 2014: RFC and vote on features both for 5.7 and 5++;
branch 5.7 at the appropriate time.
December 2014: 5.7.0 alpha 1.
First half of 2015: test and release 5.7 as per previous 5.x releases,
but also continue to RFC and vote on 5++ features.
June 2015: release 5.7.
Second half of 2015: feature freeze for 5++.
December 2015: release 5++.
This would allow us to stagger releases on each major branch: future
5.x releases (I'm assuming there would at least be a 5.8 in 2016)
would be mid-year, and 5++.x releases would come at the end of the
year. Effectively, no more than one branch would be in feature freeze
and QA at a time, hopefully avoiding a situation where php-src
developers are getting totally burned out trying to stabilise
different major versions at the same time. Eventually, of course, 5.x
would be phased out and 5++.x would be the only branch moving forward,
just as 5.x is today.
Am I talking complete bollocks? Should we get all of the
aforementioned features into future 5.x releases and not even consider
a new major? Is my schedule totally unrealistic?
Thanks,
Adam, who loves starting a good flame war on a Friday.
hi Adam!
Internaleers!
We seem to have a few things being discussed at the moment that are
somewhat beyond the scope of the sorts of changes we've been adding
since 5.3. (I think the new release and voting processes have
generally worked well here, incidentally: 5.4 and 5.5 have both been
releases with a good range of new features, yet haven't caused
significant pain in terms of BC and have been pretty stable.) Things
that fall into that category for me include:
- size_t and int changes.
really not going to wait 6 for that. But we have another thread to discuss it.
- Dare I say it, better multibyte encoding handling. (I don't want to
repeat the PHP 6 experience, but I'm also not sold on mbstring-ng
being the ultimate solution.)
mbstring-ng and full unicode support can be seen as two different
topics. While some parts overlap.
So here's my question: should we be starting to lay out a rough
schedule and list of desired features for a new major release? (I'm
going to call it 5++, since the actual number is controversial; I'd
prefer 7, but I know there's a school of thought that 6 is usable
again. Whatever. We can bikeshed that down the track.)
No way for me, 6 never existed and I see no good reason to skip it
just because we failed to make it happen back then. I'm not in
marketing but tech. Also releasing 6 may actually improve our image.
But releasing it as 7 will make us look like clowns again. Let avoid
that.
Cheers,
Pierre
@pierrejoye | http://www.libgd.org
Hello,
As far as I know, there is an RFC that defines that big PHP releases are
done once a year and EOL of previous branches are done in a manner that
there are no more than 3 branches active at any moment. If you push 5.7 and
in half a year release 5++ - you will end up with 4 paralel active branches
and that's not good. We have to rememeber that 5++ will bring a lot of
change and internal devs will have to deal with of influx of pull requests,
extension updating, deal with educating people how to not mess up while
updating the extensions for 64 bit support and so on.
As far as the version number goes - PHP 6 is fine. The mess with the
Unicode support happend a long time ago and probably is not remembered by
many :)
Arvids.
On Fri, Jan 24, 2014 at 8:40 AM, Arvids Godjuks arvids.godjuks@gmail.comwrote:
Hello,
As far as I know, there is an RFC that defines that big PHP releases are
done once a year and EOL of previous branches are done in a manner that
there are no more than 3 branches active at any moment. If you push 5.7 and
in half a year release 5++ - you will end up with 4 paralel active branches
and that's not good. We have to rememeber that 5++ will bring a lot of
change and internal devs will have to deal with of influx of pull requests,
extension updating, deal with educating people how to not mess up while
updating the extensions for 64 bit support and so on.As far as the version number goes - PHP 6 is fine. The mess with the
Unicode support happend a long time ago and probably is not remembered by
many :)Arvids.
Whatever the process used, I do agree that it is time to get started, at
least with scheduling, PHP 5++.
As for the controversial naming. I don't think there would have been any
issue with using 6 if the problem was simply the Unicode support. The
problem I see (and I'm only making the point, not suggesting either way) is
that there were so many posts and more importantly books that are still in
circulation for "PHP 6".
Now, the above isn't "our" problem or mistake, but, they do exist and could
cause confusion to the user base.
Jonny.
Internaleers!
We seem to have a few things being discussed at the moment that are
somewhat beyond the scope of the sorts of changes we've been adding
since 5.3. (I think the new release and voting processes have
generally worked well here, incidentally: 5.4 and 5.5 have both been
releases with a good range of new features, yet haven't caused
significant pain in terms of BC and have been pretty stable.) Things
that fall into that category for me include:
- size_t and int changes.
- Generics.
- Function and method naming rationalisation (whether through
aliasing existing functions, or adding a new API through enabling
method calls on scalar variables).- Dare I say it, better multibyte encoding handling. (I don't want to
repeat the PHP 6 experience, but I'm also not sold on mbstring-ng
being the ultimate solution.)- Named arguments.
- Unbundling of ext/mysql and removal of features deprecated in 5.4 and
5.5.
I agree that the time has come. We have accumulated a number of big changes
which would benefit from a major-version jump and some of us are also eager
to introduce some BC breaks ;)
My schedule recommendation would be to give PHP6 at least two years after
5.6. After all, it's a larger change, so we'll presumably need more time.
Is there any problem with using the current master branch as PHP6 right
away? 5.7 (should it exist) can be branched off 5.6 after all.
Nikita
My schedule recommendation would be to give PHP6 at least two years after
5.6. After all, it's a larger change, so we'll presumably need more time.
It is, but I'm also wary of having too big a gap between starting work and
releasing. Plugging away for years without a release is really
demoralising, as the PHP 6 experience showed. If anything, I feel like 18
months between 5.6 and 5++ is longer than ideal, but I think staggering the
release timing is worthwhile.
Is there any problem with using the current master branch as PHP6 right
away? 5.7 (should it exist) can be branched off 5.6 after all.
We already have things that are likely to end up in 5.7, I think — I'd
rather have a 5.x-master rather than forcing developers to maintain long
lived feature branches for things that are 5.x material but not going into
5.6.
Adam
My schedule recommendation would be to give PHP6 at least two years after
5.6. After all, it's a larger change, so we'll presumably need more time.It is, but I'm also wary of having too big a gap between starting work and
releasing. Plugging away for years without a release is really
demoralising, as the PHP 6 experience showed. If anything, I feel like 18
months between 5.6 and 5++ is longer than ideal, but I think staggering the
release timing is worthwhile.Is there any problem with using the current master branch as PHP6 right
away? 5.7 (should it exist) can be branched off 5.6 after all.We already have things that are likely to end up in 5.7, I think — I'd
rather have a 5.x-master rather than forcing developers to maintain long
lived feature branches for things that are 5.x material but not going into
5.6.
Hah finally a serious talk about next major, with no (not yet) trolls in it.
We have to release a new major , or at least to start thinking about
it seriously.
5.3 and 5.4 could have been majors by themselves, as they really fully
changed the way you develop PHP apps.
Like Nikita said, we have enough new (BC breaking) features and ideas
to start PHP5++
I'd like to add that I'd like to use this major to introduce some
clean-up as well, should they be internal or external.
We're gonna break BC, let's do it in a way so that we start back with
a new clean code base, like when PHP5.0 got released, with a new Zend
Engine 2 inside.
Let's use this major to refactor internals code and finally tidy up
things as well in external API.
Julien.P
Hah finally a serious talk about next major, with no (not yet) trolls in
it.
We have to release a new major , or at least to start thinking about
it seriously.
5.3 and 5.4 could have been majors by themselves, as they really fully
changed the way you develop PHP apps.Like Nikita said, we have enough new (BC breaking) features and ideas
to start PHP5++I'd like to add that I'd like to use this major to introduce some
clean-up as well, should they be internal or external.
We're gonna break BC, let's do it in a way so that we start back with
a new clean code base, like when PHP5.0 got released, with a new Zend
Engine 2 inside.
Let's use this major to refactor internals code and finally tidy up
things as well in external API.Julien.P
--
agree with all of the above mentioned points.
I had a related post back in November, where I mentioned that we don't have
a process for making major versions, but we desperatly need one:
http://news.php.net/php.internals/70233
I'm already seeing the force/sneak in inappropriate changes to a minor
version happening, because we don't have a plan for a major.
--
Ferenc Kovács
@Tyr43l - http://tyrael.hu
Just wish to say that I'll love to help refactor some internal code in
addition to ideas and implementations (didn't got the opportunity to
comment lately but wish to note that).
Hah finally a serious talk about next major, with no (not yet) trolls in
it.
We have to release a new major , or at least to start thinking about
it seriously.
5.3 and 5.4 could have been majors by themselves, as they really fully
changed the way you develop PHP apps.Like Nikita said, we have enough new (BC breaking) features and ideas
to start PHP5++I'd like to add that I'd like to use this major to introduce some
clean-up as well, should they be internal or external.
We're gonna break BC, let's do it in a way so that we start back with
a new clean code base, like when PHP5.0 got released, with a new Zend
Engine 2 inside.
Let's use this major to refactor internals code and finally tidy up
things as well in external API.Julien.P
--
agree with all of the above mentioned points.
I had a related post back in November, where I mentioned that we don't have
a process for making major versions, but we desperatly need one:
http://news.php.net/php.internals/70233
I'm already seeing the force/sneak in inappropriate changes to a minor
version happening, because we don't have a plan for a major.--
Ferenc Kovács
@Tyr43l - http://tyrael.hu
So here's my question: should we be starting to lay out a rough
schedule and list of desired features for a new major release? (I'm
going to call it 5++, since the actual number is controversial; I'd
prefer 7, but I know there's a school of thought that 6 is usable
again. Whatever. We can bikeshed that down the track.)
I realise some on internals would moan, but so far as users care, I
think 6 would make the most sense.
And yes, I think we should lay out a schedule. We definitely need to
have more time to prepare this than a usual x.y+1 release, though - a
major release is a major overhaul and 12 months is probably not enough.
--
Andrea Faulds
http://ajf.me/
Adam Harvey wrote:
Adam, who loves starting a good flame war on a Friday.
It would perhaps be nice to avoid the same mistakes that Python made when
re-factoring 3.0 and not taking the rest of the user base with them. The level
of breaking of BC needs to be carefully balanced?
And I still think that 5.4 should have been a major hike which would have
allowed a little more flexibility then.
--
Lester Caine - G8HFL
Contact - http://lsces.co.uk/wiki/?page=contact
L.S.Caine Electronic Services - http://lsces.co.uk
EnquirySolve - http://enquirysolve.com/
Model Engineers Digital Workshop - http://medw.co.uk
Rainbow Digital Media - http://rainbowdigitalmedia.co.uk
Adam Harvey wrote:
Adam, who loves starting a good flame war on a Friday.
It would perhaps be nice to avoid the same mistakes that Python made
when re-factoring 3.0 and not taking the rest of the user base with
them. The level of breaking of BC needs to be carefully balanced?
And I still think that 5.4 should have been a major hike which would
have allowed a little more flexibility then.
There is a lot that PHP's 5/6 transition can learn from Python's 2/3
transition. One might be, IMO, not to backport any new features.
Otherwise people will simply keep using 2/5 instead of 3/6, due to the
features also being available there.
--
Andrea Faulds
http://ajf.me/
Adam Harvey wrote:
Adam, who loves starting a good flame war on a Friday.
It would perhaps be nice to avoid the same mistakes that Python made
when re-factoring 3.0 and not taking the rest of the user base with
them. The level of breaking of BC needs to be carefully balanced?
And I still think that 5.4 should have been a major hike which would
have allowed a little more flexibility then.There is a lot that PHP's 5/6 transition can learn from Python's 2/3
transition. One might be, IMO, not to backport any new features. Otherwise
people will simply keep using 2/5 instead of 3/6, due to the features also
being available there.
Big +1 , Python 2 to 3 should be taken care of when thinking about PHP5++.
Also, we should remember what we actually did from PHP4 to PHP5.
We changed the objects management (that was the biggest change), and
even with a compatibility mode INI settings which was pretty hard to
develop from an internal POV, it still took AGES for people to migrate
from 4 to 5, mainly because of "compatibility issues" regarding
objects, and because of the new error reporting system showing much
more messages on badly designed code in PHP5 than it did in PHP4.
I wasnt an internal guy at this time, but I still remember 2004 pain.
Everybody felt enthusiast , PHP 5.0 was a pretty nice product , but it
took about 5 to 7 years to finally jump to 5.X branch :-p
Times have changed, PHP and all its ecosystem is nowadays more mature
than before, but still...
We must not do any mistake for PHP6 , nobody will pardon a mistake.
Every wrong step or decision could lead to PHP's death , we really
have to take care of everything.
Julien
We must not do any mistake for PHP6 , nobody will pardon a mistake.
Every wrong step or decision could lead to PHP's death , we really
have to take care of everything.
I think, longer term, we must also realise that without reform, PHP will
die anyway, if we let it fall too far behind the competition. PHP 6 is a
chance to change some things for the better.
--
Andrea Faulds
http://ajf.me/
Hi!
I think, longer term, we must also realise that without reform, PHP will
die anyway, if we let it fall too far behind the competition. PHP 6 is a
chance to change some things for the better.
Frankly, I don't see a reason for all this doom and gloom. There are a
lot of people using PHP, and they are pretty happy with it. Of course,
languages come out of fashion, and that can happen with PHP too, but so
far it doesn't seem to happen. There of course if a lot of room for
improvement, and all of it is welcome, but I we should not move in the
direction of "PHP will die unless we do something drastic right now". I
personally feel such description regarding the state of PHP would be
just wrong.
Stanislav Malyshev, Software Architect
SugarCRM: http://www.sugarcrm.com/
(408)454-6900 ext. 227
Adam Harvey wrote:
Adam, who loves starting a good flame war on a Friday.
It would perhaps be nice to avoid the same mistakes that Python made
when re-factoring 3.0 and not taking the rest of the user base with
them. The level of breaking of BC needs to be carefully balanced?
And I still think that 5.4 should have been a major hike which would
have allowed a little more flexibility then.There is a lot that PHP's 5/6 transition can learn from Python's 2/3
transition. One might be, IMO, not to backport any new features. Otherwise
people will simply keep using 2/5 instead of 3/6, due to the features also
being available there.Big +1 , Python 2 to 3 should be taken care of when thinking about PHP5++.
Also, we should remember what we actually did from PHP4 to PHP5.
We changed the objects management (that was the biggest change), and
even with a compatibility mode INI settings which was pretty hard to
develop from an internal POV, it still took AGES for people to migrate
from 4 to 5, mainly because of "compatibility issues" regarding
objects, and because of the new error reporting system showing much
more messages on badly designed code in PHP5 than it did in PHP4.I wasnt an internal guy at this time, but I still remember 2004 pain.
Everybody felt enthusiast , PHP 5.0 was a pretty nice product , but it
took about 5 to 7 years to finally jump to 5.X branch :-p
Times have changed, PHP and all its ecosystem is nowadays more mature
than before, but still...We must not do any mistake for PHP6 , nobody will pardon a mistake.
Every wrong step or decision could lead to PHP's death , we really
have to take care of everything.Julien
Coordinating with user-space projects will be critical to avoiding that
same chicken-and-egg problem. It took 100+ projects banding together to
declare "we're mad as hell, and don't give a crap about PHP 4 anymore"
to finally make that transition happen, and that was 3 years after PHP
5.0 was released. If we want PHP 5++ to have an easier transition
period (yes please!), we need to coordinate that with major projects and
frameworks to make sure that they 1) Can up their requirements in a
reasonable timeframe; 2) Have a good reason to do so; 3) Can all do so
around the same time so that there's no "first mover penalty".
That sounds like a good topic for FIG to help with, and I'm happy to act
as a coordinator between Internals and FIG around that.
I also agree with others who've said that PHP 5++ is the right time to
heavily refactor/rewrite the engine itself, just as was done for PHP 5.
Its also a place that leaning on HHVM (either for code, or concepts,
or something) would be very valuable.
--Larry Garfield
Adam Harvey wrote:
Adam, who loves starting a good flame war on a Friday.
It would perhaps be nice to avoid the same mistakes that Python made
when re-factoring 3.0 and not taking the rest of the user base with
them. The level of breaking of BC needs to be carefully balanced?
And I still think that 5.4 should have been a major hike which would
have allowed a little more flexibility then.There is a lot that PHP's 5/6 transition can learn from Python's 2/3
transition. One might be, IMO, not to backport any new features.
Otherwise
people will simply keep using 2/5 instead of 3/6, due to the features
also
being available there.Big +1 , Python 2 to 3 should be taken care of when thinking about PHP5++.
Also, we should remember what we actually did from PHP4 to PHP5.
We changed the objects management (that was the biggest change), and
even with a compatibility mode INI settings which was pretty hard to
develop from an internal POV, it still took AGES for people to migrate
from 4 to 5, mainly because of "compatibility issues" regarding
objects, and because of the new error reporting system showing much
more messages on badly designed code in PHP5 than it did in PHP4.I wasnt an internal guy at this time, but I still remember 2004 pain.
Everybody felt enthusiast , PHP 5.0 was a pretty nice product , but it
took about 5 to 7 years to finally jump to 5.X branch :-p
Times have changed, PHP and all its ecosystem is nowadays more mature
than before, but still...We must not do any mistake for PHP6 , nobody will pardon a mistake.
Every wrong step or decision could lead to PHP's death , we really
have to take care of everything.Julien
Coordinating with user-space projects will be critical to avoiding that same
chicken-and-egg problem. It took 100+ projects banding together to declare
"we're mad as hell, and don't give a crap about PHP 4 anymore" to finally
make that transition happen, and that was 3 years after PHP 5.0 was
released. If we want PHP 5++ to have an easier transition period (yes
please!), we need to coordinate that with major projects and frameworks to
make sure that they 1) Can up their requirements in a reasonable timeframe;
- Have a good reason to do so; 3) Can all do so around the same time so
that there's no "first mover penalty".
That's a mandatory request yes. We make this language for our users,
so we absolutely have to listen to them.
As usual, we won't be able to satisfy everyone, but we definetly have
to listen to our user base.
That sounds like a good topic for FIG to help with, and I'm happy to act as
a coordinator between Internals and FIG around that.I also agree with others who've said that PHP 5++ is the right time to
heavily refactor/rewrite the engine itself, just as was done for PHP 5.
Yep, PHP5 was a major rewrite from an internals POV, but still keeping
the same PHP4 VM base principles.
Rasmus or any guy who participated in such a rewrite could give a word about it.
Its
also a place that leaning on HHVM (either for code, or concepts, or
something) would be very valuable.
Yup, however, we still have a goal => beeing able to run on any
machine, any platform (well, a large part of)
I like HHVM, but it is a Facebook product, fitting FaceBook's own needs.
PHP is not to be tied to a particular architecture, PHP still has to
run everywhere, everytime, and still has to be very extensible.
That's what made its glory, and I think we must keep those objectives.
That is also what makes developping PHP itself a true challenge, so interesting.
Julien
PHP is and should remain:
- a pragmatic web-focused language
- a loosely typed language
- a language which caters to the skill-levels and platforms of a wide
range of users
The web is not typed. If we are going to expand the type checking we
have to respect type coercion. If people can no longer do:
age_check($_POST['age'])
because age_check is defined as:
function age_check(int $age) { }
then we have a problem. This is why PHP doesn't have type checks for
coercible types, of course. Many suggestions I have seen so far use the
friendly-sounding "type hint" term to introduce strict typing. They
aren't hints at all in those implementations. It doesn't mean we can't
do something here, but it has to be done very carefully.
And rather than piling on language features with the main justification
being that other languages have them, I would love to see more focus on
practical solutions to real problems. The password_hash()
addition in
5.5 is a good example of addressing a real Web problem.
PDO could use some attention. For example, I've been looking at
PDO-mysqlnd and mysqli-mysqlnd and trying to get them to share the
underlying mysqlnd connection. Why? Because PDO has a very nice
client-side prepare implementation which saves 2 network roundtrips per
query over doing them server-side. But, at the same time mysqli has some
very nice low-level features people would love to have access to. Being
able to export the underlying PDO connection to the native API across
all the drivers would be a significant improvement.
Performance is always interesting. There are plenty of places where we
can get some performance wins, especially through tighter integration
with opcache.
Unicode Unicode Unicode.
And yes, I know these are much harder and less sexy than adding a couple
of tokens to the yacc grammar, but when we start looking at a new major
release this is what I hear from people who are running PHP in
production environments are looking for. Language features are nice, if
they are well thought out, but significant infrastructure improvements
are nicer.
-Rasmus
PHP is and should remain:
- a pragmatic web-focused language
- a loosely typed language
- a language which caters to the skill-levels and platforms of a wide
range of users
Please don't forget
-
a template system for generating dynamic web pages.
<?= ?>
and alternate syntax
: ... ENDx
are very important to me!
Rick
PHP is and should remain:
- a pragmatic web-focused language
- a loosely typed language
- a language which caters to the skill-levels and platforms of a wide
range of usersPlease don't forget
- a template system for generating dynamic web pages.
I would categorize that under "web-focused", but yes, hopefully that
part goes without saying.
-Rasmus
PHP is and should remain:
- a pragmatic web-focused language
- a loosely typed language
- a language which caters to the skill-levels and platforms of a wide
range of usersPlease don't forget
- a template system for generating dynamic web pages.
I would categorize that under "web-focused", but yes, hopefully that
part goes without saying.-Rasmus
Something else we should be thinking about is that "web focused" has
been changing. When PHP 5 came out, the web still consisted almost
entirely of request-response-end workflow, which PHP does very well.
However, "web focused" now needs to deal with websockets, server-sent
events, asynchronous IO, HTTP 2 (persistent connections and multiple
responses for a single request), "lots of small callback requests" and
other things where PHP, or at least mod_php, is not well suited at all.
The "shared nothing, every request is its own world" has a lot of
benefits, but also limitations.
(The folks over at ReactPHP / Ratchet, for instance, have had to
re-implement a ton of libraries to make them async so that they can do
async logic, which has huge performance benefits if done properly.)
I do not want to turn this into another threads debate, but we probably
should consider if better general support can be given for
less-traditional models, which are becoming more common for the web.
--Larry Garfield
2014/1/24 Rasmus Lerdorf rasmus@lerdorf.com
PHP is and should remain:
- a pragmatic web-focused language
- a loosely typed language
- a language which caters to the skill-levels and platforms of a wide
range of usersThe web is not typed. If we are going to expand the type checking we
have to respect type coercion. If people can no longer do:age_check($_POST['age'])
because age_check is defined as:
function age_check(int $age) { }
then we have a problem. This is why PHP doesn't have type checks for
coercible types, of course. Many suggestions I have seen so far use the
friendly-sounding "type hint" term to introduce strict typing. They
aren't hints at all in those implementations. It doesn't mean we can't
do something here, but it has to be done very carefully.
I've wrote a lot on that subject when the floodgates were open on the
internals. I think under type-hinting most of the people understood the
convertable type of hints, when a string is automatically converted to a
number (float or int depending on the defined typehint) and I still support
that idea. I strongly belive that those who are advocating to strict type
hints have to be banned from the list (joke!), but seriosly - as you said,
there can not be any kind of strict type hinting in PHP and I belive this
has to be declared somewhere on php.net in writing as an axiom.
And rather than piling on language features with the main justification
being that other languages have them, I would love to see more focus on
practical solutions to real problems. Thepassword_hash()
addition in
5.5 is a good example of addressing a real Web problem.PDO could use some attention. For example, I've been looking at
PDO-mysqlnd and mysqli-mysqlnd and trying to get them to share the
underlying mysqlnd connection. Why? Because PDO has a very nice
client-side prepare implementation which saves 2 network roundtrips per
query over doing them server-side. But, at the same time mysqli has some
very nice low-level features people would love to have access to. Being
able to export the underlying PDO connection to the native API across
all the drivers would be a significant improvement.
The PDO. This is something that needs so much improvement that it's
ridicilous it has survived till this time. I use Yii framework as my tool,
they use PDO as their base. I have considered many times to integrate a
mysqli to PDO wrapper to bring things like mysqli_ping, unbuffered queries
and lost more. At this point I can do without those things because I do not
have a lot of load on my projects, but they are growing and at some point
abandoning the PDO will be a nesesity due to it's lack of features.
I think PDO is a bad idea for PHP as a whole. We are better of with a
consisten API through the native drivers and maybe a PDO like thing that
gives us data objects, but still provides ability to get to the low level
stuff that is sometimes needed. PHP lately has moved to projects that
previosly where done on Java and some other move advanced tech. And lack of
frameworks using the native drivers is kind'a bad, because in really
advanced projects you have to create your own framewok...
Performance is always interesting. There are plenty of places where we
can get some performance wins, especially through tighter integration
with opcache.Unicode Unicode Unicode.
And yes, I know these are much harder and less sexy than adding a couple
of tokens to the yacc grammar, but when we start looking at a new major
release this is what I hear from people who are running PHP in
production environments are looking for. Language features are nice, if
they are well thought out, but significant infrastructure improvements
are nicer.-Rasmus
Agree. Although I'm unable to help directly (my C is confined to some basic
Borlan C/C++ in DOS), I agree with your view absolutely.
The PDO. This is something that needs so much improvement that it's
ridicilous it has survived till this time. I use Yii framework as my tool,
they use PDO as their base. I have considered many times to integrate a
mysqli to PDO wrapper to bring things like mysqli_ping, unbuffered queries
and lost more. At this point I can do without those things because I do not
have a lot of load on my projects, but they are growing and at some point
abandoning the PDO will be a nesesity due to it's lack of features.
I think PDO is a bad idea for PHP as a whole. We are better of with a
consisten API through the native drivers and maybe a PDO like thing that
gives us data objects, but still provides ability to get to the low level
stuff that is sometimes needed. PHP lately has moved to projects that
previosly where done on Java and some other move advanced tech. And lack of
frameworks using the native drivers is kind'a bad, because in really
advanced projects you have to create your own framewok...
But note, if you blindly switch from PDO to mysqli, which in turn
usually means moving from client-side prepares to server-side prepares,
chances are you are going to take a significant performance hit. Like I
said, it means two extra network roundtrips per sql query and for one
large project I worked on that meant an extra 40ms latency per web request.
So I don't think PDO is a bad idea. Having a single source of common
functionality needed by all DB drivers makes sense. Imagine if every
lower-level driver needed to implement their own client-side prepare
feature? And a consistent API across the low-level drivers isn't
feasible since each DB has a lot of specialization. It would end up
looking exactly like PDO but with a bunch of special calls for each one.
If you could bounce back and forth between PDO and the lower-level
driver easily you get the consistent API and you get access to all the
lower-level features. Also, from a migration point of view, scrapping
PDO and rewriting all the low-level drivers to be "consistent" would be
an absolute nightmare.
-Rasmus
Nice to see Rasmus showing and giving ideas about improvements, and
ideas about not to do of PHP5++.
I agree we should work on PDO as well as Unicode.
I agree we shouldn't change the language massively, to something typed
for example.
I agree we added tons of new languages syntaxes from 5.0 to 5.6 , now
thoughts should be turned on optimizations, internal refactoring and
coping with the "future of the web" (async, websockets and all).
I agree we should take PHP5++ to merge OPCache code to ZendEngine.
I have myself ideas, which are for most of them internal
optimizations, let me throw you them.
- Threaded VM ? One big part
- Unicode
- AST in parser
- Better compiler / VM definitions/optimizations
- VM refactoring : VM and compiler are nowadays patches onto patches
onto patches , we just cant continue this way (Dmitry , thoughts ?)
Anyway, nothing can be possible without contributors. Even with very
talented ones, we could end up with unreleasable ideas (Andrei's
Unicode implementation).
We should learn from the past, and count our human resources. Even
having 2 or 3 years development may not be enough, depending on the
problems we want to address and the number of (motivated) people
wanting to contribute.
Julien.P
Julien Pauli wrote:
I agree we should work on PDO as well as Unicode.
Since the Firebird PDO driver is the sort of reverse situation to the mysql one
in that much of the transaction handling that PDO 'introduces' prevents using
features in Firebird. I'm using various frameworks that simply hide PDO anyway.
I know that ADOdb has been shouted down in the past, but I'd like to re-open
that debate since PDO is NOT a good answer to the cross database situation, and
so every framework seems to create it's own version of ADOdb internally
resulting in a smaller subset of databases being available to use. In many cases
even though PDO is used only mysql is available anyway - so why use PDO at all?
( Just for information, Firebird can lock transactions across multiple databases
while PDO is unable to handle any more than one per connection! )
--
Lester Caine - G8HFL
Contact - http://lsces.co.uk/wiki/?page=contact
L.S.Caine Electronic Services - http://lsces.co.uk
EnquirySolve - http://enquirysolve.com/
Model Engineers Digital Workshop - http://medw.co.uk
Rainbow Digital Media - http://rainbowdigitalmedia.co.uk
The PDO. This is something that needs so much improvement that it's
ridicilous it has survived till this time. I use Yii framework as my tool,
they use PDO as their base. I have considered many times to integrate a
mysqli to PDO wrapper to bring things like mysqli_ping, unbuffered queries
and lost more. At this point I can do without those things because I do not
have a lot of load on my projects, but they are growing and at some point
abandoning the PDO will be a nesesity due to it's lack of features.
I think PDO is a bad idea for PHP as a whole. We are better of with a
consisten API through the native drivers and maybe a PDO like thing that
gives us data objects, but still provides ability to get to the low level
stuff that is sometimes needed. PHP lately has moved to projects that
previosly where done on Java and some other move advanced tech. And lack of
frameworks using the native drivers is kind'a bad, because in really
advanced projects you have to create your own framewok...But note, if you blindly switch from PDO to mysqli, which in turn
usually means moving from client-side prepares to server-side prepares,
chances are you are going to take a significant performance hit. Like I
said, it means two extra network roundtrips per sql query and for one
large project I worked on that meant an extra 40ms latency per web request.
in the case most of the queries happen to be prepared over and over
again there is some solution to this :
http://svn.php.net/viewvc/pecl/mysqlnd_pscache/trunk/
It plays with persistent connections, doesn't close them and when a PS
is tried to be prepared and is on the same connection there is no
round-trip and the PS is reused. Of course, all problems of pconns stay.
It's more of a PoC but in simple tests it worked.
So I don't think PDO is a bad idea. Having a single source of common
functionality needed by all DB drivers makes sense. Imagine if every
lower-level driver needed to implement their own client-side prepare
feature? And a consistent API across the low-level drivers isn't
feasible since each DB has a lot of specialization. It would end up
looking exactly like PDO but with a bunch of special calls for each one.
If you could bounce back and forth between PDO and the lower-level
driver easily you get the consistent API and you get access to all the
lower-level features. Also, from a migration point of view, scrapping
PDO and rewriting all the low-level drivers to be "consistent" would be
an absolute nightmare.-Rasmus
Best,
Andrey
Hi internals!
I think the PDO discussion has to be moved to it's own thread, because
despite the fact that it is used widely and successfully, there is a
certain percent of advanced projects that either have to work around the
issues or completelly abandon the PDO for some parts of the project,
effectivly dropping any used framework functionality related to the
database.
I have some personal gripes with PDO and actually looked into mysqli-as-pdo
library (but can't find the link to it now and it was kind'a old already at
that time), because I really had the need to use functionality that mysqli
provided and was absent in PDO - although I found some ugly
workarounds/hacks for some things and just did things differently for other
parts as ultimately hacking the framework with a MySQLi as PDO wrapper was
not worth the effort (and I solved some of the problems the ugly way).
With your permission, I want to start that "Future of PDO" thread, laying
out my personal experience with it and some thought for the future to
invite the discussion.
Arvids.
Arvids Godjuks wrote:
With your permission, I want to start that "Future of PDO" thread, laying
out my personal experience with it and some thought for the future to
invite the discussion.
Well there is a list for discussing PDO, but there has only been one post in the
last few months. I'm not sure that pushing the discussion over there would help
any? It needs a wider discussion on database support in general?
--
Lester Caine - G8HFL
Contact - http://lsces.co.uk/wiki/?page=contact
L.S.Caine Electronic Services - http://lsces.co.uk
EnquirySolve - http://enquirysolve.com/
Model Engineers Digital Workshop - http://medw.co.uk
Rainbow Digital Media - http://rainbowdigitalmedia.co.uk
2014-01-27 Lester Caine lester@lsces.co.uk
Arvids Godjuks wrote:
With your permission, I want to start that "Future of PDO" thread, laying
out my personal experience with it and some thought for the future to
invite the discussion.Well there is a list for discussing PDO, but there has only been one post
in the last few months. I'm not sure that pushing the discussion over there
would help any? It needs a wider discussion on database support in general?--
Lester Caine - G8HFL
I'm a userland PHP developer, so I can't speak to the internals of PDO and
how it is coded.
But as I spoke to people and read all kinds of stuff about PDO (and I
talked on this topic a lot with Julien Pauli when he was visiting for a
conference), PDO has some big issues on it's development side and
internals, that should be taken care of before there is a wide audience
discussion on the userland side. So my thinking is that at this point it
warants a php-internals discussion first. And then, depending on that
discussions outcome, init a wide audience discussion on the future of PDO
with PHP-FIG and others. But I want to re-iterate, and I can be wrong: PDO
is a huge undertaking by it's nature and as far as I know, there is not
much work been done since it's release and has a lot of technical dept
accumulated (just see the giant difference between the PDO and most of the
native drivers functionality wise). Internals should decine what to do with
it in the first and are there resources to even bother with it (I had a few
hints that people just don't want go near the PDO).
Also, a concern of mine is that if we start with a more broad discussion
right away, it may end up in a flamewar, unconstructive discussion and
people pushing their own ideas too much - all of what can lead to another
"Hint typing" monster thread.
I’d like to offer a few thoughts as another user-lander:
-
I couldn’t care less about PDO as I never use it. Most of my work is on corporate applications, and frankly, I care much more about the performance of my applications now, every day, than I do about the ability to later switch to another database - a path that we may or may not ever try to take. When you care about performance, and your database is non-trivial, cross-database-compatibility is a pipe dream because you need to optimize your queries (and certain schema choices) to the database engine. Even just using MySQL, for example, optimizing for MyISAM versus InnoDB are two very different things. So if we did switch databases, we'd be reworking queries, anyway. That’s just part of life as a web developer. For these same reasons, we don’t use any of the trendy ORM frameworks, since their whole point of existence is take away the “drudgery” of writing queries. The database layer is the single biggest bottleneck in most applications, and I’m not about to leave responsibility for it to generic framework code. Given all this, what I’d like to see is evolution of the mysqli API: improved performance, improved documentation, etc.
-
Perhaps as a bit of a continuance of the previous point, I don’t see a lot of value, in general, in adding built-in APIs to do things like logging or auto-loading. If they’re lightweight, I’d probably use some of them if they were available, but I don’t really miss them that much now. Such things, while present in most real-world applications, are also such a small part (code-wise and effort-wise) of those applications that even writing them from scratch every time makes for a pretty small waste of time - a few hours in a sea of thousands of hours. And, I suspect that few write them completely from scratch every time, as it’s quite easy to evolve one’s own libraries for these things. Thus, I’m not against these things per-se, but I would prefer the dev time go to more impactful changes.
-
I know this has been discussed again recently, but I’d love to see error handling reworked. A couple of wacky examples: Why do I have to use the @ operator on
fopen()
calls to keep PHP from spitting out warnings, when the return value tells you if it was successful? PHP should never, ever spit out warnings or notices in cases where error-handling code will catch the problem. And, why, to handle errors myself when instantiating a SimpleXMLElement object, do I need to toggle user error handling, then call a procedural function to get a list of errors? Why not simply throw an exception? After all, SimpleXMLElement is an OO API wrapper designed to simplify libxml use, but some of that ease is defeated when I need to wrap the wrapper just for error handling. -
On another topic that’s been the source of debate over the years, I’d love to see the project move to C++. That doesn’t mean all existing code needs to be rewritten just for the sake of conversion, but it’d great if new code could be done in C++. I’d like to contribute, but my C skills, which, honestly, were never razor-sharp to begin with, are now suffering from a couple of decades of disuse. Throw in the frequently discussed lack of documentation, the state of the code (patchy), and the inherent complexity of a project like PHP, and it’s pretty tough for someone like me to get going in a meaningful way and with a dedication of time that I can actually afford as a working family man.
-
And yes, I’d love to have a coherent cross-API design. I understand the glue history of the language, but as a user-land developer, I don’t really care. That one time that I need to use the mysql library from C, well, I’ll hit the docs; I would expect no less. But I don't expect to have matching APIs in my high-level language (PHP). Besides, with all the differences that are bound to be in there beyond function name and argument order (say, whether an arg is passed as an int or char, or whether it’s passed by ref), I really don’t think that the little bit of familiarity assistance gained at the lower level is worth the loss of consistency at the higher level. After all, where do most PHP programmers spend most of their time? Again, it’s about putting limited dev time to concerns that are more impactful, and a consistent API is easily more impactful than vague API familiarity for a tiny slice of PHP developers. Now, a lot of ideas have been thrown about around on how to achieve this, and at this early juncture, I think I could live with most of them if it means moving toward a designed language rather than an evolved one.
-
Finally, improved performance and memory management are absolutely always good things, as are things like simplified configuration and improved security features.
--
Robert E. Williams, Jr.
Senior Vice President of Software Development
Newtek Businesss Services, Inc. -- The Small Business Authority
https://www.newtekreferrals.com/rewjr
http://www.thesba.com/
Notice: This communication, including attachments, may contain information that is confidential. It constitutes non-public information intended to be conveyed only to the designated recipient(s). If the reader or recipient of this communication is not the intended recipient, an employee or agent of the intended recipient who is responsible for delivering it to the intended recipient, or if you believe that you have received this communication in error, please notify the sender immediately by return e-mail and promptly delete this e-mail, including attachments without reading or saving them in any manner. The unauthorized use, dissemination, distribution, or reproduction of this e-mail, including attachments, is prohibited and may be unlawful. If you have received this email in error, please notify us immediately by e-mail or telephone and delete the e-mail and the attachments (if any).
Hi!
And yes, I know these are much harder and less sexy than adding a couple
of tokens to the yacc grammar, but when we start looking at a new major
release this is what I hear from people who are running PHP in
production environments are looking for. Language features are nice, if
they are well thought out, but significant infrastructure improvements
are nicer.
I wholeheartedly agree. There were a lot of attention lately to adding
new syntaxes, and not as much attention at all to adding new APIs and
improving existing APIs, and in my opinion, language APIs matter no less
than syntax, especially in a glue language like PHP, maybe even more.
Figuring how to do databases uniformly and take PDO into 21st century
would be a huge boon, people could stop reinventing the bicycle of
database abstraction layer over and over. We though PDO would take this
niche but looks like it wasn't enough.
Adding more capabilities like nonblocking operations, or more APIs that
now are being reimplemented in each app separately (autoloading?
escaping? logging? here feedback from major projects could be very useful).
--
Stanislav Malyshev, Software Architect
SugarCRM: http://www.sugarcrm.com/
(408)454-6900 ext. 227
Adding more capabilities like nonblocking operations
Nonblocking PDO database queries would be really great!
Stas Malyshev wrote:
Figuring how to do databases uniformly and take PDO into 21st century
would be a huge boon, people could stop reinventing the bicycle of
database abstraction layer over and over. We though PDO would take this
niche but looks like it wasn't enough.
The problem with PDO is that it offers no management of the Schema or SQL and
only partial management of even the data. As an example of the mess currently
being supported, I have been asked to look at replacing a W2k based CCTV
management system. The system is working fine, it's only 'politics' that is
driving the change, but paying for new software is something that is not being
provided by the 'powers to be'. ZoneMinder looks like it will provide a Linux
based alternative. It's PHP powered on the interface, so something I'm
comfortable with except ... it's still only using mysql driver! Adding to the
fun, the database management is python scripts, and other sections of the
package are using perl. I have yet to actually get it working on one of my
machines as one part or another keeps throwing errors so I've not yet even seen
if it's worth spending time reworking, but one of the first steps if I do find
it usable will be to rework the database interface and get it working with Firebird.
Interestingly while the roadmap says 'Replace all tabs with 4 spaces!' there is
no mention of upgrading to mysqli :)
--
Lester Caine - G8HFL
Contact - http://lsces.co.uk/wiki/?page=contact
L.S.Caine Electronic Services - http://lsces.co.uk
EnquirySolve - http://enquirysolve.com/
Model Engineers Digital Workshop - http://medw.co.uk
Rainbow Digital Media - http://rainbowdigitalmedia.co.uk
Adam Harvey wrote:
Adam, who loves starting a good flame war on a Friday.
It would perhaps be nice to avoid the same mistakes that Python made
when re-factoring 3.0 and not taking the rest of the user base with
them. The level of breaking of BC needs to be carefully balanced?
And I still think that 5.4 should have been a major hike which would
have allowed a little more flexibility then.There is a lot that PHP's 5/6 transition can learn from Python's 2/3
transition. One might be, IMO, not to backport any new features. Otherwise
people will simply keep using 2/5 instead of 3/6, due to the features also
being available there.
That's the rule already. But requests to pusch one or another feature in
previous versions keep coming, it has to stop.
Cheers,
Pierre