Fix too many arguments error to match PHP