Casting the return value
class TextInput { public function __toString() { return (string) $this->label; } }