Is it possible in php to bring custom classes to standard variable types? That is, so that you can do something like this:
<? class myClass{ var $str; function myClass($str) { $this->str = $str; } function boolean(){ return strlen($this->str); } function string(){ return $this->str; } }; $mc = new myClass('string'); if($mc) echo "String '$mc' is not empty."; else echo "String is empty." ?>
I was looking for an answer in nete, but apparently I was looking badly.