SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Addict say's Avatar
    Join Date
    Sep 2003
    Location
    At work
    Posts
    371
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Number of arguments

    How to find out the number of arguments for a particular functions dynamically?

  2. #2
    <!-- Insert thoughts here --> pitcher17's Avatar
    Join Date
    Apr 2004
    Location
    The great white north
    Posts
    293
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    func_num_args() returns the number of arguements passed to a function.

    HTH
    The more time I save by not planning and documenting,
    the more time I have left to debug.


  3. #3
    SitePoint Addict say's Avatar
    Join Date
    Sep 2003
    Location
    At work
    Posts
    371
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    func_num_args need to be place in the target function inorder to know the number of arguments.

    For me, the function is created by clients (target), I need my server side scripts to get the number of args dynamically.

  4. #4
    <!-- Insert thoughts here --> pitcher17's Avatar
    Join Date
    Apr 2004
    Location
    The great white north
    Posts
    293
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Could you give an example to clarify?
    The more time I save by not planning and documenting,
    the more time I have left to debug.


  5. #5
    SitePoint Addict say's Avatar
    Join Date
    Sep 2003
    Location
    At work
    Posts
    371
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi, I got it work! Thanks anyway pitcher17!
    FYI, I'm into rpc now, so whatever the client calls, my server need to validate the number of args is correct.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •