I’m pretty excited about this release, there is bunch of stuff that I want to get my hands on (the Filter extention and the DateTime objects being noteworthy) but probably the most immediate change of importance to me is the fix to the magical __toString() method.
Up till 5.2 __toString() was only called when the object was sent to echo or a print() – now you can throw the object around anywhere that would cast the object to a string, and have it call the __toString() method:
$string = 'foo'.$barObject;
$string = (string) $object;
// functions & language constructs
// which take strings as arguments
$foo = new Foo();
catch (FooException $e)
even the echo shortcut should work!
Thanks guys – and keep up the hard work!