PHP 5.4

PHP 5.4 comes with new cool stuff

the most important one is the new horizontal reuse of code

That will add a lot of possibilities, and much simpler code reuse with Traits and Grafts(yet to be implemented) which will change a lot the use of behaviors in Yii, possibly in version 2.0

Another change will be the use of


<?=$saySomething?>

even with short_tags off, which I like

Just posting here to see what you think of such features

Cheers,

Gustavo

There are also JsonSerializable, array dereferencing, $this in closures and more stuff will come with alpha 2. I do like it very much but it will be reasonable to use 5.4 only if it will be stable for the time Yii2 will be released.

true

changed from probably to possibly, altho IMO, its worth for Yii2 to delay a bit longer to add 5.4 support, as it will change how OOP is done in php

and there is a lot of new stuff, I only mentioned two of it in my first post

array dereferencing is also very usefull, and sometimes you can fake it with yii’s ccomponent ( method getMylist return array and you can call $this->mylist[‘something’] )

It all depends on how wide it will be adopted… there are still some hosting companies that do not offer PHP 5.3…

I am really looking forward to use closures! I have programmed Groovy for 2 years and it is a fantastic construct.

They are avaliable right now and work in Yii right now if you have 5.3 :) Using them, works fine.

Looking at the changelog for the v5.4 beta1 release, I stumbled upon PDO using the mysql native driver now. I haven’t really made my mind about that but can’t help to find that exciting news. Looking forward to get mysqlnd on my test environment :lol:

Traits add a lot of new functionality into php, not just in the traits itself but in the way it’ll handle the various parts of it like visibility, conflicts and abstract classes etc. 5.4 is going to be a bit of a learning curve and more so than 5.3 by the looks of it as a lot of the functionality is really useful (5.3, goto statements? really!). I can see it being a while before 5.4 has its true potential realised, it’ll be exciting all the same.

Great news. The current default error handling which can not be catched - unless you write a custom handler - sucks.

This one is also great. I have missed it once or twice, used it often when programming java.

There are so many interesting rfcs. I hope most of them make - but I think that’ll delay the relase too much.

As 5.4 is stable now, taking into account release 2 of Yii seems really really far from now and 5.4 being deployed in hosting environments, i also vote for a php 5.4 support for Yii 2.0.

Furthermore, the Yii development lifecyle on major release is slow if not very slow, even more if we compare against other frameworks which took the php 5.3 bend long time ago, some even approach the 5.4 bend now so taking the 5.3 bend in 12 or 16 months from now would very much like taking a very old run.

There are strategic resons for this. Some distros and hosters are very conservative regarding major software updates. Keep in mind: This is in order to help spreading Yii, not to keep bleeding-edge.

Good point, but i see distros and hosters a little more reactive than they have been in the past.

I also don’t forget we are talking about a situation that will come between one and 2 years… that’s quite a thing…

Yii 1.x releases are very good to help spreading, that’s my opinion.

It’s not like doing the first version of a product and leaving everyone behind without any other choice than accepting what is imposed as requirements.

Regarding bleeding-edge, i don’t see it in the php release supposed to be supported. I see it much more in the release 2 of Yii itself before it becomes stable with all the needed fixes it will require (look at all the issues we still have for 1.1.11…) + the fact it will takes quite some time before having an interesting extension repository ready again.

Finally, the only one still "supported" release in the 5.x branch is 5.3.10.

Release 5.3.0 has been released the 2009-06-30 which means by the time Yii 2.0 comes out, php 5.3 branch will not be supported anymore … as end of support of 5.3 branch is 2012-06-30 which is not representative of a supposed new 2.0 release era coming after that date. For for the numerous years to come with Yii 2.0, what will we say in front of a problem or a security issue ? It’s not Yii fault, ask Zend who decided to not support 5.3 branch anymore before Yii 2 comes out and uses it ?

PHP 5.4.1 is now out

Hm, looks like there are some big plans for PHP v5.5

PHP 5.4.3 is now out