//that's working fine
$test= new string_extended("this is my anonymous string");
echo $test;


/that's not working, but should'nt it be the case ?
$test = (string_extended) "This is my anonymous string";
echo $test;

I'll find this very usefull :x, it's just a syntax ehancement nope ?

Can't give you a definite answer but presumably it's not calling the constructor when you type cast it. Add a line to your constructor that will show if this is the case. Eg:

function __construct($str){
    $this->contents=$str;
    echo "In string_extended constructor...<br />\n";
}
--
              Richard Heyes

       In Cambridge or near Liverpool
    Street station in London? Employ me

        http://www.phpguru.org/cv

+----------------------------------------+
| Access SSH with a Windows mapped drive |
|    http://www.phpguru.org/sftpdrive    |
+----------------------------------------+

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to