improve functions signatures for php strictness