Join Up!
104886 members and counting!

 
downloads | documentation | faq | getting help | mailing lists | reporting bugs | php.net sites | links 
search for in the  
previousdoublevalfloatvalnext
Last updated: Mon, 28 Oct 2002
view the printer friendly version or the printer friendly version with notes or change language to Czech | Finnish | Spanish

empty

(PHP 3, PHP 4 )

empty -- Prüft, ob eine Variable einen Wert enthält

Beschreibung:

int empty ( mixed var)

Diese Funktion liefert TRUE, wenn eine Variable nicht definiert, leer oder gleich 0 ist, ansonsten FALSE.

$var = 0;
if (empty ($var)) { #evaluates true 
    print '$var is either 0 or not at all set';
}
if (!isset ($var)) { // evaluates false
    print 'The $var is not set at all';
}

empty() kann nur auf Variablen, nicht aber auf Ausdrücke angewandt werden.

Siehe auch isset() und unset().

User Contributed Notes
empty
add a note about notes
There are no user contributed notes for this page.
previousdoublevalfloatvalnext
Last updated: Mon, 28 Oct 2002
Copyright © 2001, 2002 The PHP Group
All rights reserved.
This mirror generously provided by: http://phpbuilder.com/
Last updated: Thu Oct 31 18:34:28 2002 EST