Gold Vision Communications / Germany
 GOLDVISION.COM
Serving the Multimedia Community since 1989.
English Site | Spanish Site 

 Allgemeines

 Web Hosting

 Virtual Dedicated Servers

 Domaincheck

 Bestellen

 Order Status

 Support

 Kontakt

 Download

 Network

 Network Status

 Webdesign Partner

 Kreditkartenzahlung

 AGB

 Impressum

 Rechtliche Hinweise

 Datenschutz
  PHP / Functions
Functions

Chapter 12. Functions

User-defined functions

A function may be defined using syntax such as the following:

function foo ($arg_1, $arg_2, ..., $arg_n)
{
    echo "Example function.\n";
    return $retval;
}

Any valid PHP code may appear inside a function, even other functions and class definitions.

In PHP 3, functions must be defined before they are referenced. No such requirement exists in PHP 4.

PHP does not support function overloading, nor is it possible to undefine or redefine previously-declared functions.

PHP 3 does not support variable numbers of arguments to functions, although default arguments are supported (see Default argument values for more information). PHP 4 supports both: see Variable-length argument lists and the function references for func_num_args(), func_get_arg(), and func_get_args() for more information.


© 1998-2009 Gold Vision Communications All Rights Reserved.