I
I
iFrolov2012-05-12 09:42:46
PHP
iFrolov, 2012-05-12 09:42:46

Are there frameworks for PHP 5.4+?

Has anyone come across frameworks written with active use of traits, new syntactic sugar for arrays and other PHP 5.4 chips?

Answer the question

In order to leave comments, you need to log in

6 answer(s)
S
Sergey, 2012-05-12
Protko @Fesor

There is no special meaning. You can take any framework for PHP 5.3 (Symfony2, Zend2, Yii2 which will be released) and use all the charms of PHP5.4 there as you want.
In fact, all the innovations of PHP5.4 are not specifically needed by the framework. Traits? These are normal macros. The content of the trait replaces the apt usage of the trait in the code - nothing else. The code is basically the same. In my opinion, the use of traits should be kept to a minimum. I can't think of a situation where they are really needed. For myself, I used traits only for Yii 1.* models in order not to write the model() method every time in the model .
Syntactic sugar is useful only for user code (configs, for models and controllers), the same applies to other goodies.
The only useful thing in PHP 5.4 is the increase in performance, but again, this should not affect the code and architecture of the framework in any way.
In general, nothing prevents you from using PHP 5.4 with existing frameworks.
If this answer doesn't suit you, take a look at auraphp . The architecture of it somehow reminds me of a terrible mixture of Yii and Symfony2 with its charms. But there, too, the "power" of PHP5.4 is not particularly used, again, since it makes no sense.
Now, if they introduced annotations / attributes of objects ...

K
Konstantin, 2012-05-12
@unity_ultra_hardcore

zend2, right?

G
Garret, 2012-05-12
@Garret

The above is for ZF2.
I can add Doctrine 2.2 ORM, it is supposed to use a trait to access entity fields

V
Vyacheslav Plisko, 2012-05-12
@AmdY

Not yet, but I think EVERYONE will soon, as traits and bindTo look so great in the framework that it seems impossible to live without them.

N
Nazar Mokrinsky, 2012-06-30
@nazarpc

I am writing a CMF in PHP 5.4.
Traits has not yet been used, but some things have already managed to permanently remove compatibility with PHP 5.3.
Well, the directives from php.ini were finally removed outdated - fewer checks need to be done.

G
GM2mars, 2013-12-04
@GM2mars

As far as I know, Yii2 on php 5.4 And the alpha version has already been released.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question