FIX undefined offset when methods have default parameters

This should fix the problem with default parameters

But this works only for PHP 5.3+

[Fixes #9]