Nothing really. I mean, some stuff bugs me about the wayt it's parsed but not the syntax itself.
I'm happy using $obj->item and afaik it's not only used in PHP. The same syntax is used in C but for different meanings so I can see how that may be confusing. % is modulus in most languages so using that as a string operator wouldn't feel right.
Things that bug me about the way it's parsed:
__toString() only works when type casting (fixed in 5.2.0)
The new keyword needs to return to a variable before the object can be used, i.e.:
Code: Select all
new MyClass()->method(); //doesn't work
(new MyClass())->method(); //doesn't work
MyClass::instance()->method(); //DOES work
I'd like to see stricter types added but only as an option to developers, without actually forcing people to implement it. As in:
Code: Select all
public function float getBodyMassIndex(string $gender, float $weight, float $height)
{
//
}
And I'd like to see namespacing. I could clean up so many hideously long class names with some namespacing/packaging support.