So far it was argued that by virtue of having no memory management, there will be nothing that needs to be freed and hence no finally clause would be needed.
Of course this was flawed reasoning as there are still many other resources that will require manual freeing, so now the problem has been fixed.
While it was bad that the flawed reasoning existed in the first place. I don't see how fixing bad assumptions made a decade ago is laughable.
Let's not argue here. Obviously he's a cool kid and we should all learn a thing or two from him. Like how to be the very last person here who still thinks its fun to take pot shots at PHP.
I guess that the reason you don't understand why php is so popular is that you never built anything, you probably just play with the latest cool language building toy projects as a hobby.
PHP being popular is a fact, that doesn't mean that I use or advise using php only.
And the fact that lots of people that don't understand that syntactic sugar is not the only thing that matter in a language always bash popular languages that are not "cool" is a very common symptom that describes my previous comment very well.
And there is a third fact, that "sensitive" people like you that don't like strong opinions like mine feel the urge to disagree in a way that adds no value to the conversation and ironically call others "douche".
You extrapolated some fantasy and strawmanned the parent, that makes you a douche.
> I guess that the reason you don't understand why php is so popular is that you never built anything.
What.
> you probably just play with the latest cool language building toy projects as a hobby.
Is that meant to be disparaging? It reeks of someone who doesn't know a whole lot beyond the PHP ecosystem. There isn't a dichotomy of PHP and then "cool" languages.
I think PHP is useful in certain scenarios but acting like a zealot (or as you like to call it having "strong opinions") over it is fucking stupid.
"Look here you little shit," says Bizarro Rich Hickey, "In the last few years I've made a new programming language used by thousands of developers and a powerful new distributed database. What did you build? Before that I did C++ and Java for many years. If I want to insult some aspects of C++ or Java or software engineering methodologies or hey, even PHP, for whatever deficiencies they have (this has nothing to do with popularity!), or if I just want to bemoan the fact these other things are still popular and have glaring deficiencies, I'll damn well do it."
I'll submit that BUGHUNTER's comment was really just a less coherent version of this http://briancarper.net/blog/497/im-turning-into-a-lisp-snob applied clumsily to the new PHP release, and he's unhelpfully using the rhetorical pattern of "sigh, why PHP?" without elaboration of why he thinks PHP sucks (left to others who are not downvoted to oblivion). I'm glad he's getting downvoted since you can look at past HN threads over the years about PHP and see even less coherent snide (and sometimes just plain asinine) comments being upvoted. I'd agree his post serves little value here. But my main point in this reply is that, how can you tell, unless you know who BUGHUNTER is, that he has probably only ever written toy projects in a "cool" language? Hell, he might even just be a Common Lisp guy, how old is that language now? It's not even the latest coolness! (Has it ever been cool?) It's really easy to turn into a smug lisp weenie even while at the same time building shit: http://smuglispweeny.blogspot.com/2008/03/my-biggest-lisp-pr... So again, why the personal attack on the supposed lack of coding chops on you presumably don't know?
It wasn't my intent to make it look like a personal attack.
I just tried to summarize the typical person that always pops in this kind of discussions arguing how bad language X is because it has ugly syntax or does not have Y feature.
Or look I'm special because I don't use this thing that everybody says is ugly.
I think that somebody that truly understand what LISP is all about also understands a lot more about languages and also why dumb, easy to use and popular languages like PHP exists and what are their purpose.
All languages have problems but usually they have some features that make it a very good choice for some kind of problem and PHP has the right features to make it a very good language for rapid web app prototyping.
I apologize. I thought the use of "Bizarro" as a prefix would make it clear it wasn't really you saying those things, but the reference might not be as recognized as I think and I just realized Google probably omits it... I just sent an email to PG to see if he/a HN moderator will delete the comment.
I doubt that, I know of a few companies running PHP on Azure because they like it and others running PHP on Windows servers because their IT dept refuses to support Linux.
I've never experienced this. I've spent years of my life developing on PHP on Windows (and mostly, but not only, deploying on Linux). I've never got the impression that Windows is 2nd class like it is for Python.
It comes with well working Apache and IIS bindings by default; the Windows package contains a large number of compiled extensions; a fair set of Windows-specific extensions are enabled by default (including support for COM and .NET interfacing, for instance); command-line PHP (for e.g. Composer or Symfony) works just fine; most if not all posix-ish builtin functions have good Windows implementations.
Also, the built-in HTTP server that was added in PHP 5.4 works just fine on Windows. Really, I have no idea what you're talking about.
That said, I've never looked into whether PHP is as performant or secure on Windows.
I suppose it depends on which subset of functions you are using.
I developed a PHP app on Windows which did mailsending, push notifications (APE) and UTF8 encoding. All of these things behaved differently between operating systems.
Mail sending? Hmm, curious. Sure, there's STMP-settings in php.ini vs sendmail, but that can't be a show stopper, right? Also, PEAR::Mail did the rest for me, back in the days. I'm sure there's even better options these days.
I'm also curious how UTF8 was different. After all, since PHP arrays are simply binary arrays, how can it be different?
That may be true for servers, but certainly not for developers, or rather the average PHP user. Think of all the WAMP installations used to setup a Wordpress page.
It strikes me that several of the languages that gained popularity at the turn of the century are having a bit of an identity crisis in the face of their increasing irrelevance. This is especially evident in PHP, but I'm beginning to feel the same about Java in the face of JDK8.
With the new breed of popular languages (Ruby, Python, Scala, Clojure etc.) heavily influenced by functional programming, it seems as if the incumbents are desperate to remain relevant by adding comparable features with little consideration for their impact on the language as a whole.
For me, PHP has become (quite some time ago actually) a "kitchen sink" of a language; if another language has it, it's a fair bet that PHP will try to add it at some point in the future.
> For me, PHP has become (quite some time ago actually) a "kitchen sink" of a language; if another language has it, it's a fair bet that PHP will try to add it at some point in the future.
But is that a problem? I've not seen the fancy new features that PHP added in the last years clash with one another yet.
The only con might be that PHP has become a relatively "big" language. Closures (but weirdly done), references, 2 styles of classes, object literals, namespaces, half-assed reflection with support for magic comments, constants that are slower than variables, some magic functions and methods here and there, half of which have lecacy history. That's a fair lot to take in at once.
But once you've taken it in, it simply allows you to write better PHP code, more productively, than 4 years ago. How can that be bad?
I think it can be bad not for yourself, but when you have to start dealing with other peoples' code. There's little consensus on 'best practices' for some of the newer features, so it's likely you'll end up having to maintain someone else's code who started using new features (closures, for example) without really understanding how they worked, or how they could best be used.
"goto" in PHP is another example of this. I've heard from many people "well, just don't use it!" but... 6 months from now, I'll be handed a codebase that is replete with goto and other stuff that not only do I not use, but the original author didn't really know how to use either.
Adding more features adds more stuff we all have to be aware of, whether or not you use it.
I worked for several years as a C++ developer. Let me tell you that a "kitchen sink" language is a problem. You have to choose a subset to work in, there's lots of corner cases, and moving from one shop to another will turn you quickly into a language lawyer rather than a programmer.
At this point I don't think its smart to wait. It's time to move on and start looking at alternative ways to lock down PHP. I'm running 5.4 and had to make the difficult decision to upgrade my server without it. There can be PHP security without Suhosin. And maybe I have bad information but hasn't there not been a single peep out of the Suhosin project for a seriously long time?
Point taken but I don't understand your aversion to no more magic quotes. Yeah, it's helpful when you run third party code but the benefits outweigh the costs. Anyone running third party code should be testing it first anyway and in the long run magic quotes gave people a false sense of security and promoted a very lax attitude toward security no matter how many times people screamed about not relying on magics quotes.
Thanks to everyone working on PHP for all of their hard work. Looking forward to using that new password hashing API in future production systems in particular, once 5.5 goes final.
Where is the list of deprecated features? At this point PHP really doesn't need new features as much as it needs an internal cleanup of its API's and Libraries and a complete re-write of its "VM"
52 comments
[ 1.8 ms ] story [ 89.2 ms ] threadarray/string de-referencing will help write less useless lines of code.
Why are people still using this?
One negative aspect of open source is that it prevents failed technologies from disappearing.
yeah. Why? What particular items makes you laugh?
Of course this was flawed reasoning as there are still many other resources that will require manual freeing, so now the problem has been fixed.
While it was bad that the flawed reasoning existed in the first place. I don't see how fixing bad assumptions made a decade ago is laughable.
And the fact that lots of people that don't understand that syntactic sugar is not the only thing that matter in a language always bash popular languages that are not "cool" is a very common symptom that describes my previous comment very well.
And there is a third fact, that "sensitive" people like you that don't like strong opinions like mine feel the urge to disagree in a way that adds no value to the conversation and ironically call others "douche".
> I guess that the reason you don't understand why php is so popular is that you never built anything.
What.
> you probably just play with the latest cool language building toy projects as a hobby.
Is that meant to be disparaging? It reeks of someone who doesn't know a whole lot beyond the PHP ecosystem. There isn't a dichotomy of PHP and then "cool" languages.
I think PHP is useful in certain scenarios but acting like a zealot (or as you like to call it having "strong opinions") over it is fucking stupid.
So I guess you also don't understand why PHP is popular.
> It reeks of someone who doesn't know a whole lot beyond the PHP ecosystem.
You are now making some "fantasy" assumptions.
You missed the point from the beginning and now you are trying to take this into mud with all kind of assumptions and insults.
I'm stopping here.
I'll submit that BUGHUNTER's comment was really just a less coherent version of this http://briancarper.net/blog/497/im-turning-into-a-lisp-snob applied clumsily to the new PHP release, and he's unhelpfully using the rhetorical pattern of "sigh, why PHP?" without elaboration of why he thinks PHP sucks (left to others who are not downvoted to oblivion). I'm glad he's getting downvoted since you can look at past HN threads over the years about PHP and see even less coherent snide (and sometimes just plain asinine) comments being upvoted. I'd agree his post serves little value here. But my main point in this reply is that, how can you tell, unless you know who BUGHUNTER is, that he has probably only ever written toy projects in a "cool" language? Hell, he might even just be a Common Lisp guy, how old is that language now? It's not even the latest coolness! (Has it ever been cool?) It's really easy to turn into a smug lisp weenie even while at the same time building shit: http://smuglispweeny.blogspot.com/2008/03/my-biggest-lisp-pr... So again, why the personal attack on the supposed lack of coding chops on you presumably don't know?
I just tried to summarize the typical person that always pops in this kind of discussions arguing how bad language X is because it has ugly syntax or does not have Y feature. Or look I'm special because I don't use this thing that everybody says is ugly.
I think that somebody that truly understand what LISP is all about also understands a lot more about languages and also why dumb, easy to use and popular languages like PHP exists and what are their purpose.
All languages have problems but usually they have some features that make it a very good choice for some kind of problem and PHP has the right features to make it a very good language for rapid web app prototyping.
Interesting thing to say given that php.net itself runs a development version of PHP.
There are obviously going to be substantially fewer changes between 5.4.8 - 5.4.9 and 5.4.8 - 5.5.0
Well, that sucks. And everybody was laughing/bitching/both at MS for dropping support for them with VS 2012.
It comes with well working Apache and IIS bindings by default; the Windows package contains a large number of compiled extensions; a fair set of Windows-specific extensions are enabled by default (including support for COM and .NET interfacing, for instance); command-line PHP (for e.g. Composer or Symfony) works just fine; most if not all posix-ish builtin functions have good Windows implementations.
Also, the built-in HTTP server that was added in PHP 5.4 works just fine on Windows. Really, I have no idea what you're talking about.
That said, I've never looked into whether PHP is as performant or secure on Windows.
I developed a PHP app on Windows which did mailsending, push notifications (APE) and UTF8 encoding. All of these things behaved differently between operating systems.
I'm also curious how UTF8 was different. After all, since PHP arrays are simply binary arrays, how can it be different?
With the new breed of popular languages (Ruby, Python, Scala, Clojure etc.) heavily influenced by functional programming, it seems as if the incumbents are desperate to remain relevant by adding comparable features with little consideration for their impact on the language as a whole.
For me, PHP has become (quite some time ago actually) a "kitchen sink" of a language; if another language has it, it's a fair bet that PHP will try to add it at some point in the future.
But is that a problem? I've not seen the fancy new features that PHP added in the last years clash with one another yet.
The only con might be that PHP has become a relatively "big" language. Closures (but weirdly done), references, 2 styles of classes, object literals, namespaces, half-assed reflection with support for magic comments, constants that are slower than variables, some magic functions and methods here and there, half of which have lecacy history. That's a fair lot to take in at once.
But once you've taken it in, it simply allows you to write better PHP code, more productively, than 4 years ago. How can that be bad?
"goto" in PHP is another example of this. I've heard from many people "well, just don't use it!" but... 6 months from now, I'll be handed a codebase that is replete with goto and other stuff that not only do I not use, but the original author didn't really know how to use either.
Adding more features adds more stuff we all have to be aware of, whether or not you use it.
Everyone please donate so he doesn't give up!
http://hardened-php.net/donate.45.html
(also: suhosin github page https://github.com/stefanesser/suhosin/issues )
http://stackoverflow.com/questions/568609/why-isnt-suhosin-p...
That was "only" six months ago so it's not forever.
Unless you do not use any third party code and have your own code audited, it's foolish not to run with suhosin.
I'm still trying to get over the naked feeling of running without magic quotes in 5.4 when using third-party code.
5.4.9 final will be tagged next week, November 19th and released on Thursday the 22nd.
Changelog:
https://raw.github.com/php/php-src/PHP-5.4.9/NEWS
Build Status: OK Last Build Time: 45 hours
Compile Warnings: 1116 Code Coverage: 70.4% Test Failures: 103 Expected Test Failures: 44 Valgrind Reports: 59