Re: [PHP4BETA] isset()

From: Date: Fri, 21 Apr 2000 06:15:43 +0000
Subject: Re: [PHP4BETA] isset()
References: 1  Groups: php.version4 
Request: Send a blank email to php-version4+get-13853@lists.php.net to get a copy of this message
: If you call it against an object, does it just check the first var? What exactly do you mean? See if this answers your question: class etc { var $name; } $my = new etc; print isset ( $my -> name ) ? "Its set" : "Nah!"; print "\n"; $my -> name = "cool"; print isset ( $my -> name ) ? "Its set" : "Nah!"; print "\n"; print isset ( $blah -> name ) ? "Its set" : "Nah!"; print "\n"; print is_object ( $my ) ? "my is an object" : "etc not an object!"; print "\n"; print is_object ( $blah ) ? "blah is an object" : "blah not an object!"; print "\n"; Nah! Its set Nah! my is an object blah not an object! Note: $blah is not an object! Enjoy! Faisal

« previous php.version4 (#13853) next »