Hi internals, Is there a way to hook the cast_object handler in userspace ? What I want is a default "to_string" method called when I do something like:
class my_object extends class_with_default_to_string_method { private $value = "Hello"; public function to_string() { //overhiding default to_string wich prints "Object id #n" return $this->value; } } $o = new my_object(); echo $o; or: $o = new xxx(); echo "My stringfied value is=$o"; Thanx, Cristiano Duarte -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php