

PHP 5.5 released and other things PHP related - inovica
http://www.phpweekly.com/archive/2013-06-20.html

======
iso8859-1
Changelog here: [https://github.com/php/php-
src/blob/php-5.5.0/NEWS](https://github.com/php/php-src/blob/php-5.5.0/NEWS)

Highlights:

* Opcode cache ([https://wiki.php.net/rfc/optimizerplus](https://wiki.php.net/rfc/optimizerplus))

* Generators and coroutines ([https://wiki.php.net/rfc/generators](https://wiki.php.net/rfc/generators))

* "finally" keyword

* Constant array/string dereferencing

* Optimized access to temporary and compiled VM variables. 8% less memory reads.

* Dropped Windows XP and 2003 support.

~~~
ChikkaChiChi
I've never used Optimizer+ so I might have to compare it with my
nginx/php5-fpm/apc buildouts.

I understand compiling bytecode to memory but I still wish there was a way to
write files bytecode files back to the disk in a similar fashion to python.

------
bratao
Ww also have a modern framework for php. Everyone should try
[http://laravel.com/](http://laravel.com/) , such a fresh air into php
development.

~~~
camus
Silex is better , i hate all these static classes everywhere. That's the only
reason i'm not using Laravel "Core" . Eloquent is nice though.

~~~
diggan
Hmm, every new framework nowadays seems to be based on Symfony2 which appears
to be kind of slow.

Is there any small (relatively new) PHP framework that isn't based on
Symfony2?

~~~
donutdan4114
4bytes is crazy fast: [https://github.com/donutdan4114/4bytes-
framework](https://github.com/donutdan4114/4bytes-framework)

------
ck2
If you need a control panel for the nifty new Zend Opcache in PHP 5.5, please
steal my ugly hack and improve it: [https://gist.github.com/ck-
on/4959032](https://gist.github.com/ck-on/4959032)

~~~
RossM
You should put this into a regular repository so that people can send pull
requests.

~~~
twodayslate
> All gists are git repositories, so they are automatically versioned,
> forkable and usable as a git repository.

~~~
imperialWicket
But they do not (yet?) support pull requests, so you end up with a number of
disparate forks.

------
inovica
This is the latest PHP weekly. With PHP 5.5 just being released today we cover
this and other news related to PHP.

~~~
inovica
One other thing - Send us announcements, blog posts, news etc and we'll
include them

------
astrodust
One step closer to launching mysql_query into the sun.

~~~
unethical_ban
why is mysql query bad? as someone who knows sql, I've always loathed over
abstracted mechanisms for db calls.

its also been a while since I've done web dev.

~~~
krapp
The old php mysql_* functions have become notorious for their vulnerability to
SQL injection[1].

In no small part because novice developers also have a tendency to build
queries directly out of $_GET parameters.

While PDO and parameterized queries aren't a silver bullet, simple strings as
queries are just a nightmare to do properly.[2]

[1] [http://stackoverflow.com/questions/60174/how-to-prevent-
sql-...](http://stackoverflow.com/questions/60174/how-to-prevent-sql-
injection-in-php) [2]
[http://www.youtube.com/watch?v=o4dJ7hdA8fs](http://www.youtube.com/watch?v=o4dJ7hdA8fs)

------
rolikoff
Signed up 2 weeks ago. Keep up the good work

~~~
dutchbrit
Same here, pretty good advanced in-depth content.

------
pearjuice
>open changelog

>ctrl+f "PSR"

>0 results

Into the trash it goes.

~~~
kbenson
Wow, PSR-2 (Coding Style Guide) seems fairly extreme (existentially, not in
it's specifics which I haven't looked at) for PHP.

Part of me thinks it's odd, considering I never felt all that much freedom to
change how I expressed things in PHP (at least not in the slightest compared
to Perl).

Another part of me thinks that enough amateur programmers use PHP that some
style guide may benefit them greatly. Then again, if people don't come to a
better style through experience (or at least an explanation of the benefits or
what mistakes it helps prevent) then is it really as useful?

~~~
itafroma
The purpose of the PSRs is to help support and foster collaboration between
members of the Framework Interoperability Group (the people who draft and
publish the PSRs: consists of medium-to-large PHP projects including Symfony,
Amazon, Drupal, Joomla, etc.). Having a common coding standard makes it much
easier to publish code as part of other PSRs as questions like "tabs or
spaces?" don't have to get rehashed every time a new PSR is drafted.

That's to say PSR-2 is not intended to a be a "best practices" type of thing:
it's actually just the result of a survey of member projects at the time with
each part chosen because that's what the majority of them did, even if it was
just a simple majority or there were member projects were with the majority
on, say, tabs vs. spaces but not, say, indentation size. Some of the FIG
member projects have adopted it, but several haven't and don't intend to. It's
useful if you don't have any other coding standard available, but easily
ignored with no loss of interoperability with the other PSRs if you do.

~~~
kbenson
Thanks for the explanation, that makes more sense.

