The online racing simulator
PHP 5.5.0 (Alpha 1) New Features!
General improvements:Core:
  • Added boolval(). (Jille Timmermans)
  • Added "Z" option to pack/unpack. (Gustavo)
  • Implemented FR #60738 (Allow 'set_error_handler' to handle NULL). (Laruence, Nikita Popov)
  • Added optional second argument for assert() to specify custom message. Patch by Lonny Kapelushnik ([email protected]). (Lars)
  • Fixed bug #18556 (Engine uses locale rules to handle class names). (Stas)
  • Fixed bug #61681 (Malformed grammar). (Nikita Popov, Etienne, Laruence)
  • Fixed bug #61038 (unpack("a5", "str\0\0") does not work as expected). (srgoogleguy, Gustavo)
  • Return previous handler when passing NULL to set_error_handler and set_exception_handler. (Nikita Popov)
It should be noted that the penultimate item in the core fixes a bug in PRISM to do with license plates and the second item adds a feature to the PACK function that allows us to fix the handling of license plates in PRISM. Now that I've gotten over how it effects PRISM, let's talk about PHP in a more general sense.

---

The simplified password hashing API is a massive step in the right direction, after looking over the RFC they posted, they did a great job on it. And it passed unanimously into the next release.

---

Generators are going to be a massive boon for people using a small amount of ram, as it's much more efficent when you want to itarate over an item, really excited to start using that! Regarding coroutines, they are intresting, but I can't currently see a use case for the, running code side by side in such as way, seems ... odd. These did pass into the next release after a vote of 24 to 1.

---

Supporting lists within foreach is possible, no more redundant varables!

<?php 
php
$users 
= array(
    array(
'Foo''Bar'),
    array(
'Baz''Qux');
);
 
// Before
foreach ($users as $user) {
    list(
$firstName$lastName) = $user;
    echo 
"First name: $firstName, last name: $lastName. ";
}
 
// After
foreach ($users as list($firstName$lastName)) {
    echo 
"First name: $firstName, last name: $lastName. ";
}
?>

Thank good, god for this one! That should save me quite a bit of time and space within my codebase! This passed, 11 to 4, but using 'silent tokens' (error suppression) did not pass 10 to 2.

---

Support for finally keyword is 'finally' here. You can now have a try, catch, finally statement it all it's glory. Pokemon programming here we come (for when you gotta catch 'em all!). This oddly passed with a vote of 25 to 5.

---

With a vote of 12 to 2, empty() and isset() will accept arbitrary arguments, I find this almost odd, but sure if you really want to pass a function to these constructs why not!?

---

Quote from https://bugs.php.net/bug.php?id=61038 :Fixed bug #61038; "Z" and better behavior for unpack()

Added new "Z" argument to pack/unpack, now allowing "a" to return data without stripping, and "A" strips all trailing white space, while "Z" will strip everything after the first null.

Ah, that's much nicer!
I still wish that foreach would not complain about looping through stuff that wasn't an array. Consistently guarding foreaches with "if(is_array)" drives me crazy. It's logical, but sometimes I wish that there was

<?php 
foreach(...){

}
else{
//NOT AN ARRAY!
}
?>


FGED GREDG RDFGDR GSFDG