
PHP 5.5.5 Released - Jeremy1026
http://www.php.net/ChangeLog-5.php#5.5.5
======
pearjuice
We can't have anything involving PHP without:

* complaints about features it has or has not

* a reference to that "a fractal of bad design" article

* how language x is better

* sarcastic notes about the above

* one guy pointing out we can't have anything involving PHP without the above

~~~
Udo
Overall you're right, this is what irritates me about almost any PHP thread as
well. Almost no HNer would go into, say, a C++ thread, spit on it and
advertise Python. But yet the same thing is happening regularly with PHP. Then
again, I was pleasantly surprised we don't have that in this thread (yet).

However, I don't think this is a worthwhile URL to point to on the grounds of
near-irrelevance. There are no major new features being released here.

~~~
astrodust
The reason Python people don't go into a C++ thread is because the C++ people
will take care of themselves, getting into bitter trench warfare over wether X
feature was a good idea, a great idea, or the worst idea ever.

PHP, Python, Ruby, Perl and C# have a lot of overlap in terms of what they do,
but the overlap between C++ and Python is way smaller. C#, C++ and Java have
much more in common.

There are some things that C++ is very good at, where the alternative is
usually C, something most would prefer to avoid.

There's nothing that PHP is very good at that Python, Ruby, Perl or C# can't
do nearly as well. That's why it attracts so much criticism.

~~~
Udo
...and there we go. I chose this example to illustrate that all languages have
individual strengths (yes, even PHP) and it doesn't make any sense to go and
shit all over something you don't like while advertising your favorite stuff.
It's bad style.

I don't see any PHP people coming into RoR security vulnerability threads just
to have a field day, but vice versa this happens all the time.

Admittedly, I could have chosen C++ and Go instead of Python, but in the end
it doesn't make much of a difference.

I've used a large number of languages and environments over the years, and I
liked a lot of them. Stop forcing people into one camp only.

~~~
noir_lord
I don't understand the hate of PHP (or any language for that matter), I've
never really gotten a good feel for why people are like this, the best I've
come up with is "If someone invests 100's of hours learning X, they then feel
the need to defend that investment in X or they made a bad choice".

The other thing I don't get is the need to identify with a language or
framework.

My current project is in PHP (Laravel based, absolutely lovely framework last
time I used a technology this fun was learning Delphi/VCL after slogging
against MFC) except all functional and integration tests are written in Python
(Selenium/WebDriver), Python is also used for 80% of my shell stuff (if it's
more than 10 lines it gets written in Python).

I'm not attached to anyone technology anymore, I chose PHP for this project
because I'd spent two years mostly working with it at work and after doing a
couple of small projects in Laravel I got a liking for it.

~~~
astrodust
People hate on PHP for a number of reasons, and that's why it's unusually
unpopular. Here's my (highly subjective) take on why.

The barrier to entry for that language is extremely low, that is anyone who
can manage to FTP a file to a server that has a bit of PHP in it can as much
as consider themselves a "PHP programmer". This means there's an awful lot of
extremely low quality PHP code out there written by people who didn't know
better.

Secondly the language itself is so dizzyingly confused, where there's
literally thousands of methods in the root namespace, and there's no pervading
design pattern. Arguments appear in random orders, terminology changes, and
functions from C, not exactly known for being programmer friendly, are simply
ported, warts and all.

Then there's the problem with deployment, where PHP hosts usually have a
woefully out of date version of PHP and many of the extensions that are
standard have been disabled for reasons that are never entirely clear. This
means writing PHP code that can be deployed on more than one host is extremely
frustrating, often leading to writing it for the lowest common denominator
just to avoid support issues.

Plus, there's this pervasive attitude amongst the PHP developers that
frameworks are a bad thing, leading to enormous amounts of badly written re-
inventions of things. People constantly write their own third-rate ORM,
implement user authentication that's practically a check-list of what not to
do, and seem to have a talent for mashing together different concerns in the
same file.

This boils down to a nearly complete lack of leadership in the PHP world as to
"how to do things properly". So long as the poisonously bad, brain-damaging
w3schools is the go-to source of knowledge for PHP developers, things will
only get worse.

If you like PHP for whatever reason, and surely some people do, the most
important thing to help promote that platform is to be vigilant about stomping
out bad development practices and setting a good example for other developers
by explaining how to do things correctly using modern techniques.

This sort of outreach is taken for granted in the Python, Ruby or Perl
communities which go out of their way to support aspiring developers. In the
PHP world, it's full of nomads that prefer to go it alone.

~~~
noir_lord
Hmm, I think there is a lot of truth in this.

I came to PHP late in my developer life (I started in the 80's when I was a
kid) and didn't touch PHP until ~2009.

I've always used the current leading frameworks (or something close) and
written PHP like I'd write Python or Object Pascal (clean, clear, commented,
separation of concerns) so my opinion of PHP is probably clouded because of
the way I approach it.

~~~
astrodust
The thing that burns me the most about PHP is a worryingly large number of
people using PHP think it's perfectly acceptable to start a project by opening
Notepad and typing in "<?php $db = mysql_connect(".

From there on it's only misery. It's like new developers start out using
techniques that should've died in the 1990s and the only reason they do this
is because they don't know any better.

In the Ruby world you'd have to be living under a rock to not know about
Rails, and the same goes for Python with Django. You're developing a web app?
You use a framework. Period.

Yet in PHP land you have people who are otherwise competent developers that
just don't know how to develop a web application. Maybe they've come from Java
and they think that writing PHP like that is clunky, but hey, everyone else is
doing it so who's to say otherwise, right?

If you like PHP and want to help, call people out when they're doing it wrong.
Give them guidance on how to do it properly. Don't just look away and pretend
you didn't see them flailing away on re-inventing the wheel.

I'm not even a PHP person but I've been pretty vigilant on the MySQL section
of Stack Overflow about petitioning against the use of the deprecated
mysql_query extension, pushing people towards PDO or ORMs, and about how
important SQL escaping is. This feels like Doctors Without Borders where I'm
explaining to a community that boiling water to kill parasites is important.

The PHP world is in really bad shape if people don't even know the basics.

------
qnk
This is just a maintenance release. If you want to see what's coming to PHP
for the next feature-release version, check the RFC wiki at
[https://wiki.php.net/rfc](https://wiki.php.net/rfc)

So far, these features will probably make it to version 5.6:

    
    
      * Internal Operator Overloading
      * Variadic functions

~~~
rbmoshe
> Variadic functions

Doesn't PHP have that already?
[http://us2.php.net/func_get_args](http://us2.php.net/func_get_args)

Edit - Checking out that parent link it seems: Currently variadic functions
are implemented by fetching the function arguments using func_get_args(). The
following code sample shows an implementation of a variadic function used to
prepare and execute a MySQL query (I'll be making use of this example
throughout the RFC):

Firstly, by just looking at the function signature public function
query($query) you cannot know that this is actually a variadic function. You'd
think that the function can only run a normal query and doesn't support bound
parameters:

    
    
      public function query($query, ...$params) { /*...
      $userData = $db->query('SELECT * FROM users WHERE id = ?', $userID)->fetch();

~~~
TazeTSchnitzel
There's a counterpart unpacking syntax which will likely also get merged in,
meaning you can have:

    
    
      function query($query, ...$params) {}
    

and

    
    
      $params = [3];
      query('SELECT * FROM table WHERE a = ?;', ...$params);

------
leeoniya
"Added support for GNU Hurd"

finally! /s

Humor aside, it's nice to see how OPCache has displaced APC and is under
active maintenance in step with the core.

------
simias
There should be a guideline against posting raw changelogs to HN. What are the
highlights? The significant features?

~~~
fafner
Raw changelogs aren't the issue. Submitting minor-minor bug fix releases is
the issue.

~~~
criswell
I think it's the 5.5.5. If it was like 5.5.3 no one would up vote it.

------
ausjke
PHP was picked on because it is too popular? I dare to say that after some
considerations my project is using PHP. I use python daily, but that does not
mean I need hate other languages. All has its places and different projects
can have different choices.

------
thehme
Goal of the day: going home to upgrade to latest PHP latest 5.5 patch version.
(5.6 later [https://wiki.php.net/rfc](https://wiki.php.net/rfc))

------
ck2
Note there is no speed improvement between PHP 5.4 and 5.5

Unless you need a 5.5 feature, best to wait.

Of course you can manually install the open-sourced zend opcode cache into PHP
5.4 and get the speed improvement from that.

~~~
ecaron
That's a rather bold statement to make. Windows users, for instance, see a
tremendous speed bump in going to 5.5
([http://blog.syntaxc4.net/post/2013/06/20/php-5-5-0-for-
windo...](http://blog.syntaxc4.net/post/2013/06/20/php-5-5-0-for-windows-
released.aspx)).

Obviously going the "there is/isn't performance gains" flamewar route alone is
a conversation nobody would win. So I would through this out there: If you
have the capability to move to PHP 5.5, because there aren't performance
penalties, you should - if for no other reason than it'll help you stay ahead
of the PHP EOL sythe.

------
rofl
You can not make "the most popular language for web development" without
attracting a few jealous people and their negativities.

Like it or not, PHP is _THE_ most popular language for developing web
applications. And it didn't reach that rank without merits.

Sun pushed Java, Microsoft pushed C#, Google pushed Python in direct and
indirect ways (but Google gave up on Python and created Go).

No big company spent a lot of money to push PHP (Yahoo started using PHP when
it was already popular). PHP reached there because it had some merits in it.

\- PHP is easy to get started and it helps _people without CS background_ to
learn it quickly and code apps to solve problems.

\- PHP doesn't force you to use OOP unless you need or want that.

A musician named Derek Sivers who had no CS background created CDBaby website
after following instructions in a PHP book. When Rails fanboys were making a
lot of news, Derek decided to use Rails and scrap the original PHP codes [1].
He hired a top Rails developer and spent a lot of money (compared to the money
- i.e. cost of a book on PHP - spent on his original PHP code) to rebuild
CDBaby in Rails. The project eventually failed - time and money lost. CDBaby
continued to grow rapidly and the site was powered by PHP codes. By telling
this story, I am not trying to say Ruby and Rails are hard or bad. Ruby and
Rails are tools just like PHP. The point I want to make with this story is PHP
can get almost anyone up and running without much difficulties. Many people
could get into business easily because of the ease of PHP. Just think if Derek
had tried to make his first site using Rails! Probably, we would have never
known the story of CDBaby.

I believe, the purpose of a programming language is to make it easy for user
(of the language) to create solution instead of trying to prove the greatness
(e.g. lot of features) of itself or it's creator.

Why is PHP easy?

PHP is easy because Rasmus Lerdorf didn't have CS background. He didn't want
to create a language to have all the features and concepts taught/learn in a
CS class of _programming languages_. Rasmus just wanted to create a tool to
easily publish pages dynamically on web.

On the other hand, you can take a look at Java if you want to know how a
language looks when the creator has PhD in CS and wants to apply all his
knowledge of CS in the language. I am _NOT_ trying to bash Java or Gosling,
just trying to explain why some languages are created complex and difficult.

TL;DR: PHP is just a tool like Ruby or C. It has plus and minus points like
any other language. PHP makes it easy to get up and running (even if you don't
have a degree in CS). If you like PHP (after you try it), stick to it (because
with PHP, you can get atleast as big as Facebook). If you don't like it, pick
another language that works for you. And this last point is mainly for Snake
lovers on HN : _never bite a language (or users of that language) because you
don 't like or use that language_.

[1]
[http://www.oreillynet.com/ruby/blog/2007/09/7_reasons_i_swit...](http://www.oreillynet.com/ruby/blog/2007/09/7_reasons_i_switched_back_to_p_1.html)

~~~
claudiug
2007, you know that then he revise him opinion about the ruby/rails. Some
language are better than others. I've work with php for some years. PHP
suffers for some serious design. The are A LOT of articles on the internet. Is
so easy to start with php that even a non programming guy will succeed! The
same for java/ruby/python/go. When you start is easy and fun. But when you
have to use your brain, when you have to do some stuff that are than CRUD then
is complicated. And is so fuckin' easy to screw up in php. OMG! btw, facebook
is using php not because is cool, but because of legacy code.

~~~
rofl
"2007" Yes, Derek wrote the article in 2007 but the facts are still correct.

"then he revise him opinion about the ruby/rails" : Derek didn't revise his
opinion (at least I am not aware of that). But I know this. The creators of
Rails read the article [1] by Derek. Since, Derek is a popular person on the
Internet and he has a lot of followers, his article on his failure to switch
to Rails can really make a lot of people stay away from Rails. And this is bad
news for the the creators and promoters of Rails. So, the obvious strategy,
for the creators of Rails, was to convert Derek into a Rails user _to reduce
the damage on popularity of Rails caused by Derek 's article_. So, he was
invited to RailsConf. When Derek is invited at RailsConf, do you expect him to
talk against Rails at the conf? So, you get the point! Derek can get invited
to RailsConf and talk a bit of good things about Rails (and he tried to learn
Rails, once more, later), but that doesn't change the original experience he
had with Rails when he tried to switch from PHP to Rails. * I don't dislike
Rails. I just made an attempt to present the the facts in response to your
comment *

"Some language are better than others" : Some language are better than others
_depending on what you are building_.

"PHP suffers for some serious design" : True. So, does any other language.
There is no perfect language available on this Earth.

"The are A LOT of articles on the internet" : True. There are many articles
that point out problems - Some of them list problems in PHP, some list
problems in Rails, some list problems in Python and so on.

"Is so easy to start with php that even a non programming guy will succeed!" :
Yes, That is why Derek, without a background in CS, could buy a book on PHP
and create first CDBaby site. There are many other examples available on
Internet.

"The same for java/ruby/python/go" : I don't deny, because I am not here to
talk against any language. If a language works for you, that's great.

"But when you have to use your brain, when you have to do some stuff that are
than CRUD then is complicated." : If it is not easy to get started, then you
will never reach a point when you will need to use your brain.

"And is so fuckin' easy to screw up in php" : If you don't know how to handle
something you can screw up easily with anything. Programming is a skill one
acquires over time. It takes time because you learn to avoid the ways that
make you screw up. You can screw up easily with any language if you don't know
how to use the language.

"facebook is using php not because is cool, but because of legacy code" :
Where is the link to source to prove your claim? Facebook has enough money to
replace all PHP codes, but instead of replacing PHP they have invested money
to improve PHP (HipHop is one example).

[1]
[http://www.oreillynet.com/ruby/blog/2007/09/7_reasons_i_swit...](http://www.oreillynet.com/ruby/blog/2007/09/7_reasons_i_switched_back_to_p_1.html)

------
dancecodes
waiting erlang features:

-pattern matching

-atoms

-tuples

-lists

-hot code loading

-function arguments matching

-tail recursion

-term_to_binary binary_to_term

-lightweight green processes with PIDs

-receive...end

-begin...end

-pash

-and other nice features from erlang

~~~
GrinningFool
Not to put too fine a point on it, but why wouldn't you just use Erlang?

~~~
dancecodes
Erlang dont have objects and namespaces

------
panacea
On a scale of 1 to 10, how would you rate this release?

~~~
perpetuated
"Added support for GNU Hurd."

10/10.

~~~
sigzero
Why?

