Am I the only one thinking PHP needs more stuff removed rather than added ?
I sort of agree with you, but then I come at it from the view point of why choose PHP? Myself, I can't think of a single awnser, but then again I'm the kind of person who learns a programing language or paradigm for fun. However there is an elephant in the room with PHP, it has, quite frankly some terrible creations made by it. In much the same way MS had a whole bunch of technologies around DCOM and the like which s…
PHP 5.5
71–80 of 112 posts
Re: PHP 5.5
#72Biggest change? - Drop Windows XP and 2003 support
Most interesting things for me: * PHP is getting the yield keyword (i.e. generators and coroutines), which many other languages have had for a while. * A sensible and simple built-in password hashing API * Error when using the deprecated mysql extension, which should hopefully get more people moving to PDO (e.g. WordPress: http://core.trac.wordpress.org/ticket/21663 )
Re: PHP 5.5
#73Earlier quoted context omitted.
PHP's versioning has generally been a bit weird since the abortive PHP 6 project. PHP 6 was meant to be the version that implemented full unicode support, but this proved to be very difficult, with the result that major new features had to go into the 5.x branch while 6.x remained in development (which, I guess, it still is). 5.3 added closures and 5.4 added traits, so adding coroutines in 5.5 is not inconsistent wit…
It seems like every major software project reaches a point where the major number just stops changing. Linux too - it became clear that it was going to be 2.6.X.Y forever, so they renumbered to 3.X.Y to make the version string shorter. I guess it's a sign of maturity: the project has reached a solid codebase with good development practices so there won't be any more overhauls that warrant a major number increase.
Re: PHP 5.5
#74And what I still don't see is anything saying they are taking their performance problems seriously. Still nothing saying they are fixing their documentation. Nothing addressing their hodgepodge of legacy code and mixed methods of implementing features. Its like their upset that people have moved on, but instead of providing a better core for people to build products on they keep adding chrome to the fringes of the la…
Re: PHP 5.5
#75Earlier quoted context omitted.
Yes. Removing stuff from a programming language has virtually no benefit and a huge real economic cost. That, of course, is under the assumption that the programming language has users. I could see them deprecating some stuff, and adding yet another E_EVEN_STRICTER level that tosses ugly notifications when deprecated things are done. That would be nice.
Hmm, but does it have to be that way? What if every new version of a programming language came with a tool that converted old source code to new source code, like Python's 2to3? That way you could cleanly handle removals, renamings and all sorts of other changes... maybe even provide implementations of old library functions in terms of new ones.
For example, PHP allows you to keep the name of a function in a variable and call it as if it were an anonymous function. So you can do something like:
$h = 'htmlspecialchars';
echo $h(''); // <script>
Of course, it's probably a bad idea to do this unless you really have no other option. (By the way, the above example is not how Lithium uses $h. But we can easily imagine a lame imitator doing the above.) But given that some programs do rely on features like this, how would you update them automatically if you decided to change the way htmlspecialchars() works?Things get even more complicated when functions change in more subtle ways. If a function that used to return FALSE on failure is updated to throw an exception instead, an automated tool would have to wrap every function call with a try-catch block, with potentially unexpected side effects. If a function that used to take strings in the system charset by default is updated to take UTF-8 all the time, you'll have to throw in some code for charset conversion before every occurrence of that function, but some servers might not have mbstring/iconv installed and turn that into a fatal error.
A better solution is actually what PHP has been doing for the last few minor versions: deprecating stupid functions like mysql_real_escape_string() and encouraging people to migrate to modern alternatives. Once a function is marked as deprecated, it will be removed in a few years. This process takes longer, but it gives everyone enough time to update their own programs.
Re: PHP 5.5
#76I can see array_column being useful instead of using foreach on sql query results.
...or PDOStatement->fetchColumn('column-name').
http://benramsey.com/blog/2013/03/introducing-array-column-i...
Re: PHP 5.5
#77And what I still don't see is anything saying they are taking their performance problems seriously. Still nothing saying they are fixing their documentation. Nothing addressing their hodgepodge of legacy code and mixed methods of implementing features. Its like their upset that people have moved on, but instead of providing a better core for people to build products on they keep adding chrome to the fringes of the la…
The PHP team does take speed seriously and just about every minor release gets a little bit faster, sometimes alot, like 20% faster. I'm not even including stuff like the opcode caches that are built in now like APC or Zend Optimizer+. Lots of times, minor releases also get more efficient with memory usage too. If you are not happy with the speed, PHP is an open source project and you can contribute patches to speed…
http://www.php.net/manual/en/internals2.apiref.php
This is PHP's documentation for fixing things internally to it. Which would be fine if the internals made any sence whatsoever, but between the implementation of steams and the abmismal design of zval's there isn't much to logically make sence of.And this isn't just well if you find it lacking its open source so make it better. We have we made better PHP's and named then things like Node.js and Python. Why would I implement a JIT in PHP when I could just use V8 and have an awesome runtime right out of the box ? Imperically PHP isn't nearly as fast or efficient as other languages, that’s not just an opinion it's been shown in multiple benchmarks and tests. I know it can be used for doing useful things and can even be used for large projects. I work on one of those daily, the issue is no one seems to care that as a platform PHP is _not_ a good choice any more, and increasingly the community isn't making a point of steering the platform to where it is a good choice. They just rattle off the same talking points of "Well facebook uses it" and "XX% of websites are using PHP so clearly it is good"
You want a good PHP release?
Provide documentaiton on the entire platform (http://www.php.net/manual/en/internals2.apiref.php)
Fix the zvals to make thbem memory efficient
Speed up the core ( not a opcode cache a real tracer and JIT )
Then add in yield and continuations, because without the other parts no one should care about language niceties, because no one should be using the language.
Re: PHP 5.5
#78And what I still don't see is anything saying they are taking their performance problems seriously. Still nothing saying they are fixing their documentation. Nothing addressing their hodgepodge of legacy code and mixed methods of implementing features. Its like their upset that people have moved on, but instead of providing a better core for people to build products on they keep adding chrome to the fringes of the la…
Could you be more specific? What's your performance problem? Where do you think the documentation is bad? In my experience these are two areas where PHP is doing pretty well. I share your reservations about legacy API (the naming scheme and parameter order of many standard PHP functions should have been cleaned up years ago) and I think adding yet another slew of OO sugar coating isn't going to encourage developers t…
Re: PHP 5.5
#79And what I still don't see is anything saying they are taking their performance problems seriously. Still nothing saying they are fixing their documentation. Nothing addressing their hodgepodge of legacy code and mixed methods of implementing features. Its like their upset that people have moved on, but instead of providing a better core for people to build products on they keep adding chrome to the fringes of the la…
Out of interest, what do you find wrong with the documentation? I've always found it pretty comprehensive and relatively easy to navigate.
Re: PHP 5.5
#80And what I still don't see is anything saying they are taking their performance problems seriously. Still nothing saying they are fixing their documentation. Nothing addressing their hodgepodge of legacy code and mixed methods of implementing features. Its like their upset that people have moved on, but instead of providing a better core for people to build products on they keep adding chrome to the fringes of the la…
> And what I still don't see is anything saying they are taking their performance problems seriously. Hmmm, you have heard about PHP-FPM right? And the built-in APC cache? And HipHop? Besides, in my experience performance problems will arise with other parts of your architecture a lot sooner that your application code (e.g. database if you're not clever about load balancing and caching), regardless of what language y…