:: Anbieterverzeichnis :: Globale Branchen
:: SELFPHP Forum ::
Fragen rund um die Themen PHP?
In ?ber
130.000 Beitr?gen finden Sie sicher die passende
Antwort! 
:: Newsletter ::
Abonnieren Sie hier den kostenlosen
SELFPHP Newsletter!
|
|
func_num_args  |
|
Befehl | Version | Beschreibung | Beispiel | Ausgabe | Download |
SELFPHP ist Shopware Solution Partner
Shopware ist ein vielfach ausgezeichnetes Onlineshop-System der shopware AG, das auf PHP. Zend Framework und SQL basiert.
SELFPHP unterstützt Sie als Shopware Solution Partner bei der Konzeption, Programmierung und Realisierung Ihres Onlineshops und passt Shopware bei Bedarf an Ihre Unternehmensbedürfnisse an.
Weitere Informationen
Befehl
int func_num_args ( void ) |
Version
Beschreibung
Warning: include_once(): http:// wrapper is disabled in the server configuration by allow_url_include=0 in /var/www/html/_includeSELFPHP/funktionsreferenz.inc.php on line 405
Warning: include_once(http://geoserver.selfphp.com/million-dollar.php?remote_address=172.17.0.1): failed to open stream: no suitable wrapper could be found in /var/www/html/_includeSELFPHP/funktionsreferenz.inc.php on line 405
Warning: include_once(): Failed opening 'http://geoserver.selfphp.com/million-dollar.php?remote_address=172.17.0.1' for inclusion (include_path='.:/usr/local/lib/php') in /var/www/html/_includeSELFPHP/funktionsreferenz.inc.php on line 405
Mit func_num_args() kann man sich die Anzahl der Argumente zurückgeben lassen, mit denen die aktuelle Funktion aufgerufen wurde.
Dabei ist darauf zu achten, dass diese Funktion nur innerhalb einer Funktion verwendet wird, da es sonst zu einer Fehlermeldung kommt.
Siehe auch:
• func_get_arg()
• func_get_args() |
Beispiel
<?PHP
function mache_was()
{
echo 'Es wurden ' . func_num_args ();
echo ' Werte an die Funktion übergeben:' . "\n";
for ( $x = 0; $x < func_num_args (); $x++ )
{
echo 'Platzierung ' . $x . ': ' . func_get_arg( $x ) . "\n";
}
}
mache_was ( 12, 23, 44, 26, 56, 99, 45, 34, 78 );
?>
|
Ausgabe
Es wurden 9 Werte an die Funktion übergeben:
Platzierung 0: 12
Platzierung 1: 23
Platzierung 2: 44
Platzierung 3: 26
Platzierung 4: 56
Platzierung 5: 99
Platzierung 6: 45
Platzierung 7: 34
Platzierung 8: 78
|
|
|
|
|
|


|