12 ms·
PHP 5.5
- dave1010uk 13y agoDownload: http://php.net/get/php-5.5.0.tar.bz2/from/a/mirror http://php.net/get/php-5.5.0.tar.bz2/from/a/mirror
- thejosh 13y agoBiggest change? - Drop Windows XP and 2003 support
- masklinn 13y agoAnd PHP finally gets finally, I guess.
- dave1010uk 13y agoMost 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 http://core.trac.wordpress.org/ticket/21663 )
- doppel 13y agoFor the last one, won't people just move to the mysqli_* function group instead? It's almost identical API-wise.
- shirederby 13y agoLine 11 is "Added simplified password hashing API"
- rmccue 13y agoI'm trying to push for that WordPress ticket, but it's unlikely that we'll get any significant traction for a while. The database class in WP (apart from being fairly horrible) is a huge component to make major changes to like that, and we have to consider backwards compatibility. Here's hoping it gets merged in the next 5 major releases. I'm not holding my breath.
- coldtea 13y agoOnly if you're using them in the first place. Most people deploy in Linux. Hence, totally irrelevant for them.
- thejosh 13y agoDeploy yes, but not develop with. Most people don't really use virtual machines (vagrant and friends) if they have XP.
- coldtea 13y agoI would say that people who develop on XP are even fewer than those who deploy on XP. It's a 12 year old OS -- surely they have moved to Vista, 7 or 8 by now.
- Jeremy1026 13y agoYou would think, my employer is still running XP on the developers machines, with no plan on an upgrade in the near future.
- coldtea 13y agoRun, don't walk (if you can).
- magnetikonline 13y agoA nice meaty change list there. Get compiling :D
- manuletroll 13y agoAm I the only one thinking PHP needs more stuff removed rather than added ?
- Rygu 13y agoIf you mean deprecation and then removal, yes. Search for deprecation in the changelog to see that it's happening already! ;)
- skrebbel 13y agoYes. 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.
- mgkimsal 13y agoIIRC E_DEPRECATED notices are triggered when deprecated stuff is referenced. http://php.net/manual/en/errorfunc.constants.php http://php.net/manual/en/errorfunc.constants.php E_DEPRECATED - Run-time notices. Enable this to receive warnings about code that will not work in future versions. (Since PHP 5.3.0)
- RossM 13y agoIndeed; in fact this update issues an E_DEPRECATED warning when you attempt to connect to a MySQL database using the old MySQL extension.
- cousin_it 13y agoHmm, 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.
- angersock 13y agoThey added coroutines in a minor number patch. wat.
- pilif 13y agoJust as rails has added the asset pipeline in a minor number patch. Or as ruby changed to unicode with 1.9. Or as python added a whole new syntax for exceptions with 2.6. As with many other languages, incrementing the minor number usually means quite big changes while more or less keeping backwards compatibility. Changing the major number is something that's done when backwards-compatibility is hugely affected. The exception is probably ruby which greatly broke backwards-compatibility with 1.9 (unicode) and mostly just changed internals with 2.0
- angersock 13y agoOh, I'm not about to hold up ruby or python as shining beacons here--though I will smugly admit that the rubyists seem to be pretty fast at updating their gems. Still, it's weird practice nonetheless, right?
- pilif 13y agoActually, I think it's fine for languages: Backwards-Incompatible change? Increment Major version Many new features, but (largely) backwards compatible? Increment Minor version. Bugfixes? Increment Patch. I think this also perfectly maps to Semantic Versioning (http://semver.org/ http://semver.org/)
- coldtea 13y ago>Still, it's weird practice nonetheless, right? No, it depends on the versioning number scheme. Not all schemes mean the same thing with major/minor/minorer.
- rjknight 13y agoPHP'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 with past behaviour. I guess it's sort-of like how every version of OSX is 10.x, even though there have been massive changes between 10.0 and 10.8; it makes more sense to think of 10.8 as being 'OSX version 8'. Likewise 'PHP5' has been around for so long that nobody really looks at the major version number any more.
- conradfr 13y agoI can see array_column being useful instead of using foreach on sql query results.
- dexen 13y ago...or PDOStatement->fetchColumn('column-name').
- ihsw 13y agoPDOStatement->fetchColumn() accepts only integers as an argument. http://ca.php.net/manual/en/pdostatement.fetchcolumn.php http://ca.php.net/manual/en/pdostatement.fetchcolumn.php
- conradfr 13y agoIt does not do the same thing, does it ? http://benramsey.com/blog/2013/03/introducing-array-column-in-php-5-dot-5/ http://benramsey.com/blog/2013/03/introducing-array-column-i...
- scribu 13y agoIt's useful for a whole bunch of things! I had it implemented in userland as a utility for years.
- desas 13y agoIt's useful for lots of things, I implemented something similar as array_pluck recently and immediately noticed lots of places where it could have been used.
- pjmlp 13y agoNow I just have to wait my ISP would eventually some day upgrade from 5.3.
- coldtea 13y agoOr you now, get with the program and get a VPS like everybody else.
- voltagex_ 13y agoI don't think this is a solution for everyone. Even though VPSes are cheap, if you're not making any money from running them, they're still a cost to you.
- kmage 13y ago$5 a month is pretty much insignificant for a VPS.
- coldtea 13y ago>I don't think this is a solution for everyone. No, but it's very much a solution for any HN developer in a Western country. He knows what to do (hence "HN") and the money are insignificant. I got a 512MB SSD VPS for $5/month from a major player. Similar plans exist all around. If $60/year is a "cost to you" and you are a developer in the US/Western Europe, then you're doing it wrong.
- BaconJuice 13y agoMind sharing this $5 vps please? I'd like one.
- anentropic 13y agoDigital Ocean
- 13y ago
- michh 13y agoSeems like a bunch of really welcome improvements. Wish I hadn't known about them though, as I probably won't be able to use them in our production environment for the next 2 years or so.
- Tomdarkness 13y agoCan I ask why it will take so long? I'm working on a medium to large scale project and we will be likely rolling the new version out to our staging environment within a week and assuming everything goes smoothly to the production environment not long after that.
- griffindy 13y agoIf michh is working on plugins for other people, shared hosts can be pretty behind on their PHP versions. I just had to backport a wordpress plugin to 5.2(!), which came out in 2006. EDIT: meant PHP versions, not plugins.
- wdmeldon 13y agoThats the curse of distributable code unfortunately. And PHP only makes it worse because it's old versions are absolutely terrible...
- maratd 13y ago> And PHP only makes it worse because it's old versions are absolutely terrible... You just need to put your foot down. 5.2 is absolutely too much, I would never develop for it. Just tell them to stop being so damn cheap and upgrade to a decent hosting company. AWS is free for a year for new clients, there's no reason for them not to switch to something decent.
- michh 13y agoMy biggest nemesis: legacy...
- porker 13y agoBest resource for learning about coroutines in (PHP|general)?
- stevelaz 13y agoCheck out Lua Coroutines, here's a starter link: http://lua-users.org/wiki/CoroutinesTutorial http://lua-users.org/wiki/CoroutinesTutorial
- dkhenry 13y agoAnd 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 language hoping to get more people sucked into developing for it only to realize that once they do anything of significant size in PHP they will need to do a full rewrite into a language that can actually scale or turn to a PHP to C++ lexer to actually get a product that doesn't also server as a Data center toaster oven.
- RossM 13y agoOut of interest, what do you find wrong with the documentation? I've always found it pretty comprehensive and relatively easy to navigate.
- Zergy 13y agoI personally found it very incomplete. The comunit makes up for it but quite often there were large gaps exspecially regarding edge cases and details on how functions would behave if they failed. The comments did a really good job of filling in these gaps but the documentation alone was often inadiquate to understand how the code would behave.
- Navarr 13y agoGenerally very little, but there are things like http://php.net/trader_stoch http://php.net/trader_stoch
- polyfractal 13y agoTo be fair, that is an optional extension and not bundled into PHP by default.
- dkhenry 13y agohttp://www.php.net/manual/en/internals2.apiref.php http://www.php.net/manual/en/internals2.apiref.php
- deleted 13y ago[deleted]
- smaili 13y agoPHP - where technology meets obesity :)
- krapp 13y agoIt's not fat... it's overloaded...
- bratao 13y agoYou can have a modern development framework for php. You guys should try http://laravel.com/ http://laravel.com/ such a fresh air into php development.
- kodablah 13y agoOne of the most overlooked features of this release is the "::class" option. Using fully qualified string literals for type (class, interface, and trait) names has really hurt refactorability.
- zemo 13y ago>Exceptions can be thrown into the generator using the Generator::throw() method. >Rewinding a generator ...wut