10 ms·
PHP 5.5.0 Alpha 6 - Released
- Mahn 14y agoAny noteworthy changes on 5.5 overall? I'm happy the language is moving forward with a seemingly faster traction than before (github effect?), but I haven't heard of any game changing feature getting implemented yet since quite a while. Still waiting for a object literals syntax myself.
- prg318 14y agohttps://raw.github.com/php/php-src/php-5.5.0alpha6/NEWS https://raw.github.com/php/php-src/php-5.5.0alpha6/NEWS
- ecaron 14y agoThe new changes I'm looking forward to are the password hashing API, scalar type hints and generators. I'm also looking forward to 3 things that AREN'T going to be there: register_global, safe mode, and magic_quotes
- calinet6 14y agoWow, those are finally going away? It's almost like the end of an era. Cool.
- lonnyk 14y agoThey were removed in 5.4 [1] [1]http://www.php.net/manual/en/migration54.incompatible.php http://www.php.net/manual/en/migration54.incompatible.php
- Jeremy1026 14y agoI too am looking forward to the new Password Hashing API. Having quick ability to hash and verify a password should save a fair bit of time in the long run.
- nachteilig 14y agoThe password hashing stuff should be really nice in the long run--at least when it's widely used. PHP in particular seems to have a lot of bad home brew implementations out there, so it'll be nice to have a better default.
- verisimilitude 14y agoIn the meantime, I really enjoy using Marco Arment's Bcrypt PHP class: https://gist.github.com/marcoarment/1053158 https://gist.github.com/marcoarment/1053158
- lotsofcows 14y agoBcrypt? It's all about scrypt these days. http://stackoverflow.com/questions/10149554/are-there-any-php-implementations-of-scrypt http://stackoverflow.com/questions/10149554/are-there-any-ph...
- jcoby 14y agoThere is a PHP 5.3.7+ implementation of the password API here: https://github.com/ircmaxell/password_compat https://github.com/ircmaxell/password_compat
- mscarborough 14y agoIt seems to continue the PHP 5.4 vein in that it adds some syntactic shortcuts and some niceties that make it a bit easier / cleaner to read and write. Personally I'm pretty happy with traits and array dereferencing against function returns. The new array literal syntax is nicer and more like other languages, in that you don't have to wrap everything with array(), instead just use the [] syntax. Feature-wise 5.4 added traits and 5.5 has generators. http://www.php.net/manual/en/migration54.new-features.php http://www.php.net/manual/en/migration54.new-features.php http://www.php.net/manual/en/migration55.new-features.php http://www.php.net/manual/en/migration55.new-features.php
- RossM 14y agoIt should be noted that the release of 5.5.0 could be delayed a bit, due to the late addition of Zend Optimizer+ [0] (an opcode cache) being included into the core release like APC. However there's a lot of arguing on php.internals about whether or not the right number of votes was reached (based on a not-specific-enough RFC on voting) so it may not even make it in. [0]: http://files.zend.com/help/Zend-Server-Community-Edition/content/optimizer_plus_component.htm http://files.zend.com/help/Zend-Server-Community-Edition/con...
- Mahn 14y agoSo is Zend Optimizer meant to replace APC altogether, or just co-exist with APC? I've been using APC quite extensively assuming it would make it into the core eventually.
- cabirum 14y agoBesides opcode caching, APC provides shared key-value storage. I don't really see why they chose Zend over APC as a standard opcache. Also, they are incompatible and cannot run together.
- molukk 14y agoThe RFC for including ZO+ outlines some possible reasons: https://wiki.php.net/rfc/optimizerplus#advantages_of_optimizer_over_apc https://wiki.php.net/rfc/optimizerplus#advantages_of_optimiz...
- Mahn 14y agoThat's why I asked, I really hope they ship APC within the core aswell if Zend Optimizer doesn't provide a data store. To be honest, I find the data store that APC provides way more important than opcode caching.
- deleted 14y ago[deleted]
- nikic 14y ago
- thetrumanshow 14y agoI'd like to get a sense of how often the PHP community tends to upgrade languages and frameworks for legacy products. Always/Never? Anyone care to provide some anecdote? For example, I have two Rails apps that are running on Rails 2.2.x, so yeah, they're way behind, and I feel some sense of urgency to upgrade them soon... but I believe I am an outlier in the Ruby/Rails community in the sense that I am not upgrading all the time.
- Jeremy1026 14y agoPHP tends to remain backwards compatible for a few major versions. Right now PHP has stable recent releases of 5.4 and 5.3. There is a bunch of older (5.2 and lower) PHP installs running around the web as well, since many cheap shared hosts aren't quick to update their installs.
- Spoom 14y agoWe keep up to date on the build version, but the first decimal version (4 in 5.4, is that considered the minor version?) usually involve at least some backward-incompatible changes, so there is usually a need to test the codebase against new minor versions.
- jcoby 14y agoPersonally, I always wait at least one year before upgrading PHP. There are always segfault or security issues or odd problems in a 5.x.0 release. It's around 5.x.4 that it becomes just stable enough to use. About a month or two before I decide to upgrade I run the newer version locally while I'm developing (but being sure to not use any newer features). This usually weeds out any major incompatibilities and fix new warnings. That said, I'm running 5.3 in production and have no real plans to upgrade to 5.4 anytime soon.
- lonnyk 14y ago>That said, I'm running 5.3 in production and have no real plans to upgrade to 5.4 anytime soon. May I ask: why not?
- nikic 14y agoFor those wondering what the new features for PHP 5.5 are at this point, here is a small (not complete) list: Large language changes: * Generators and coroutines (https://wiki.php.net/rfc/generators https://wiki.php.net/rfc/generators by me) * `finally` blocks (https://wiki.php.net/rfc/finally https://wiki.php.net/rfc/finally by laruence) Syntactic sugar: * Support for function calls in `empty()` (https://wiki.php.net/rfc/empty_isset_exprs https://wiki.php.net/rfc/empty_isset_exprs by me) * Support for `list()` in foreach (https://wiki.php.net/rfc/foreachlist https://wiki.php.net/rfc/foreachlist by laruence) * Constant array/string dereferencing (https://wiki.php.net/rfc/constdereference https://wiki.php.net/rfc/constdereference by laruence) * Getting the fully qualified class name using `ClassName::class` (https://wiki.php.net/rfc/class_name_scalars https://wiki.php.net/rfc/class_name_scalars by ralph) Standard library: * Simplified password hashing API (https://wiki.php.net/rfc/password_hash https://wiki.php.net/rfc/password_hash by ircmaxell) * `hash_pbkdf2()` function (https://wiki.php.net/rfc/hash_pbkdf2 https://wiki.php.net/rfc/hash_pbkdf2 by ircmaxell) * DateTimeImmutable, which is an immutable variant of DateTime (by derick) Key anti-features (aka BC breaks): * Dropped Windows XP and 2003 support (by pierre) * ext/mysql deprecated (https://wiki.php.net/rfc/mysql_deprecation https://wiki.php.net/rfc/mysql_deprecation by aharvey) * preg_replace /e modifier deprecated (https://wiki.php.net/rfc/remove_preg_replace_eval_modifier https://wiki.php.net/rfc/remove_preg_replace_eval_modifier by me) * Logo GUIDs removed (by ajf) For the beta 1 (the next planned released) at least two more things are planned: * Bundling of ZendOptimizer+ (https://wiki.php.net/rfc/optimizerplus https://wiki.php.net/rfc/optimizerplus by zeev) * Allowing non-scalar Iterator keys in foreach (https://wiki.php.net/rfc/foreach-non-scalar-keys https://wiki.php.net/rfc/foreach-non-scalar-keys by me)
- nolok 14y agoAre ZendOptimizer and APC meant to cohabitate in the core, or is the former going to replace the later ? Any news on object literals $o = {'abc': 456}; and scalar type hint ? Thanks for all the hard work, improvement in the language in 5.3 and 5.4 were awesome.
- nikic 14y agoZO+ will replace APC, only the user-cache from APC will be left (see also this comment: http://news.ycombinator.com/item?id=5343883 http://news.ycombinator.com/item?id=5343883). Object literals and scalar type hints won't be in 5.5. Scalar type hints may be in the next version (it's a rather tricky topic). For object literals I don't see reason to add them at all (in PHP you can just use arrays ^^).
- mgkimsal 14y agoThis is at best meta, or at worst off-topic, but I have to say with 30+ comments at the moment, this is one of the best post/discussions I've read on HN with PHP as a main focus so far - technical, no flaming, some good insights and links. Thanks everyone :)
- rijoja 14y agoThis won't add much either. I was kind of hoping for a flame-war but the feedback proved to be much more interesting than reading old clichés.
- ch0wn 14y agoDoes someone know how the test suite works? The way I understand [0] there currently 66 failing tests for the 5.5 line. Is this correct? [0] http://gcov.php.net/viewer.php?version=PHP_5_5 http://gcov.php.net/viewer.php?version=PHP_5_5