Re: Any way to make something happen when variable in class changes?

From: Date: Thu, 17 Oct 2002 23:52:01 +0000
Subject: Re: Any way to make something happen when variable in class changes?
References: 1 2 3  Groups: php.general 
Request: Send a blank email to php-general+get-120441@lists.php.net to get a copy of this message
Yes, but it needs to run when it's changed. For example, when I change the variable $var, it would echo "Changed!" (without putting the echo where it's changed). Catherine Pinatiello wrote:
I'm thinkin he means is there a way to track variable changes. Yes, copy the variable: $var = 8; $oldvar = $var; (code that changes $var) if ($var != $oldvar) { (do stuff here that you want to happen if $var is changed) } Rick Emery wrote:
that is the most vague question I've ever seeen posted here...not good thing ----- Original Message ----- From: "Leif K-Brooks" <eurleif@buyer-brokerage.com> To: <php-general@lists.php.net> Sent: Thursday, October 17, 2002 6:19 PM Subject: [PHP] Any way to make something happen when variable in class changes? Is there a way to make something happen when a variable is changed in a function? I need to be able to do something like this for my class which manipulates a record in the database.
-- The above message is encrypted with double rot13 encoding. Any unauthorized attempt to decrypt it will be prosecuted to the full extent of the law.

« previous php.general (#120441) next »