X

An Oracle blog about NetBeans for PHP

Improved Code Completion for Functions with Optional Arguments

Guest Author

In PHP it is possible to define default values for function parameters. A parameter with a default value defined becomes optional - the developer may simply skip it when writing a function call.

Now NetBeans supports optional parameters in the following way:

  1. Code completion shows all the possible variants of function call
  2. It is possible to see the default values of function parameters in the documentation window
  3. Required parameters are emphasized
  4. It is a good practice to place all the optional parameters right most so that it is easy to figure out, which optional arguments are skipped. NetBeans shows an optional warning if this convention is not followed. 

 


Join the discussion

Comments ( 5 )
  • raymond Wednesday, July 16, 2008

    Hello,

    This might not be the place but...

    It appears that Netbeans is breaking the javascript code when editing the jQuery library file.

    if you try to edit the jquery uncompressed version with netbeans it will automatically insert a closing bracket "}" after the following line:

    (function(){


  • Petr Wednesday, July 16, 2008

    Hi raymond,

    the best place for this is our Issuezilla. Please, enter issue against the javascript editor. Or if you want then I can create the issue, but from you as a user it will looks more serious:).

    Thanks,

    Petr


  • guest Wednesday, August 6, 2008

    hey, the same day you post it i posted an enhancemente about this feature, check: http://www.netbeans.org/issues/show_bug.cgi?id=139842

    I'm a zend development environment user, but planing to switch to netbeans as soon as this little enhancement were done.

    is there a better way to send feedback like this (refering to the next version with php support)?


  • Petr Thursday, August 7, 2008

    Hi,

    the issue http://www.netbeans.org/issues/show_bug.cgi?id=139842 is basically defect and we will try to fix it for the first version. I have added comment to this issues.

    Another channel to give feedback is the mailing list users@php.netbeans.org. How to subscribe I have described in this entry: http://blogs.sun.com/netbeansphp/entry/netbeans_6_5_milestone_1 .

    Thanks,

    Petr


  • links of london Friday, October 30, 2009

    It was a very nice idea! Just wanna say thank you for the information you have shared. Just continue writing this kind of post. I will be your loyal reader. Thanks again.


Please enter your name.Please provide a valid email address.Please enter a comment.CAPTCHA challenge response provided was incorrect. Please try again.